在文本框中单击,显示(弹出)日历?

时间:2012-06-01 13:21:25

标签: c# asp.net datetime calendar

我想知道如何在单击文本框时实现日历? 示例:单击文本框时,将弹出日历。 像这样:enter image description here

我点击了文本框,日历出现了。

由于

5 个答案:

答案 0 :(得分:4)

AJAX Control Toolkit具有此功能。

ASP.NET AJAX Control Toolkit Calendar Demonstration

答案 1 :(得分:2)

使用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 -->

答案 2 :(得分:0)

像jQuery UI这样的东西可能:

http://jqueryui.com/

答案 3 :(得分:0)

最快最简单的方法是使用JQuery或其他Javascript框架。

这里有一个演示:http://jqueryui.com/demos/datepicker/

答案 4 :(得分:0)

你可以尝试果汁datepicker控制

相关问题