jQuery Datepicker

By | December 24, 2013

jquery datepicker

Here you can see how to add jQuery datepicker in your web project.

In order to add jQuery datepicker in your web page you have to download source code of jQuery UI library. You can also use CDN URL for that. Open jQuery UI site and see at bottom you can get CDN URL just copy and put in your page. see below code for reference.

 <link type=”text/css” href=”//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css” rel=”stylesheet” />
<script src=”//code.jquery.com/jquery-1.9.1.js”></script>
<script src=”//code.jquery.com/ui/1.10.3/jquery-ui.js”></script>

Put above code in <head> section then make a dom <div>. Now bind jQuery datepicker with <div>. Put below code in <script>.

jQuery(function(){
jQuery(‘div’).datepicker();
})

That’s it. A calender in a page. :)

For <input /> go with same process.

jQuery(function(){
jQuery(‘input[name=datepick]’).datepicker();
})

A Full source code.

Leave a Reply

Your email address will not be published. Required fields are marked *