setting datetimepicker on textbox click in jquery


1. First you need to add these two scripts in your page head section

<script src=”http://code.jquery.com/jquery-1.9.1.js&#8221; type=”text/javascript”></script>
<script src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js&#8221; type=”text/javascript”></script>

2. Add this jquery code anywhere

<script type=”text/javascript”>
$(document).ready(function() {
$(“#datepicker”).datepicker();
});
</script>

3. Now your textbox is here

<input type=”text” id=”datepicker” value=”Select Date” />

Leave a comment