Tuesday, 21 January 2014

How to use jQuery UI datepicker in Webpage

I was developing a simple java web application where I needed a datepicker. So here is how I used the jQuery UI datepicker in my application.

First you need to include jQuery UI javascript and css in head of your html page.


Then add following html code in body section of your page where you want datepicker.

<input id="datepicker" />


after that add following javascript to your head section.

Above javaScript code runs as soon as the full html page is ready. The various options are for different variation available with the datepicker ui. You can remove and add any option as per the requirements.

Suppose you don't want the animation while calendar loads, then remove the last option 'showAnim : "slide".

You can find different variations at jQuery UI datepicker.
 I'll soon upload zip of html file with working the Datepicker.

Disclaimer: This post was originally posted by me only on my other blog dated October 24, 2012

No comments:

Post a Comment