On textbox click ,show(pop up) a calendar?

2019-05-20 00:58发布

问题:

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

回答1:

The AJAX Control Toolkit has this exact functionality in it.

ASP.NET AJAX Control Toolkit Calendar Demonstration



回答2:

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


回答3:

Something like jQuery UI maybe:

http://jqueryui.com/



回答4:

Quickest and easiest way is to use JQuery or other Javascript framework.

There's a demo here: http://jqueryui.com/demos/datepicker/



回答5:

you may try the juice datepicker control