could any body tell how to use Jquery calendar date time picker.
+1
A:
For the default options, it's simply
$(function() { // function to execute when DOM is ready
$('#input').datepicker(); // run datepicker on jQuery object
});
where you have
<input type="text" id="input" />
in your markup. You'll need to reference the scripts in the following order
- jQuery script
- datepicker script
- Your script binding the datepicker on DOM ready.
for a more advanced example, check out this demo. add /edit to the URL if you'd like to see the code behind it.
Russ Cam
2010-07-30 17:46:17
+2
A:
You do the following:
- Download the jQuery UI datepicker, which requires the UI core.
- Add the script reference to your page, and CSS for the theme
- Add the code to bind a datepicker to a textbox, as follows:
You can read the documentation here: http://jqueryui.com/demos/datepicker/
<input id="datepicker" type="text">
<script type="text/javascript">
$(function() {
$("#datepicker").datepicker();
});
</script>
Dustin Laine
2010-07-30 17:47:53
+1
A:
You might also consider a native HTML5 datepicker. User Modernizr to decide whether to use browser native or not.
Stefan Kendall
2010-07-30 18:09:27