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

23,108

Solution 1

The AJAX Control Toolkit has this exact functionality in it.

ASP.NET AJAX Control Toolkit Calendar Demonstration

Solution 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 -->
Share:
23,108
Jax
Author by

Jax

Updated on June 02, 2020

Comments

  • Jax
    Jax almost 4 years

    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 : enter image description here

    I clicked the textbox and the calendar showed up.

    Thanks