C# 在文本框上单击,显示(弹出)一个日历?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10851119/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
On textbox click ,show(pop up) a calendar?
提问by Jax
I would like to know how can I implement a calendar when the textbox is clicked?
Example: When I click a textbox , the calendar will pop up .
Like this : 
我想知道如何在单击文本框时实现日历?示例:当我单击一个文本框时,会弹出日历。像这样 :
I clicked the textbox and the calendar showed up.
我点击了文本框,日历出现了。
Thanks
谢谢
采纳答案by mccrager
The AJAX Control Toolkit has this exact functionality in it.
AJAX 控件工具包中具有这种确切的功能。
回答by Paddy
回答by Kapil Khandelwal
Cross Browser Implementation with jQuery UI Datepicker:
使用 jQuery UI Datepicker 的跨浏览器实现:
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
<div class="demo">
<p>Date: <input id="datepicker" type="text"></p>
</div><!-- End demo -->
<div style="display: none;" class="demo-description">
<p>The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p>
</div><!-- End demo-description -->
回答by indra
Quickest and easiest way is to use JQuery or other Javascript framework.
最快和最简单的方法是使用 JQuery 或其他 Javascript 框架。
There's a demo here: http://jqueryui.com/demos/datepicker/
这里有一个演示:http: //jqueryui.com/demos/datepicker/
回答by Nudier Mena
you may try the juice datepickercontrol
你可以试试juice datepicker控件

