Datepicker

1. Default

Datepicker appears on focus - click in the field. The text is in English and the date format is US (mm/dd/yyyy).

	$('#example1').datepicker();	
	

2. Enhanced

Datepicker appears on focus or icon click. It shows days in other months and the week of the year.

...
	$('#example2').datepicker({showOn: 'both', showOtherMonths: true, 
		showWeeks: true, firstDay: 1, changeFirstDay: false,
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	

3. Localized

The datepicker can be localized for a large number of languages. Here is the French version.

...
	$('#example3').datepicker($.extend({showOn: 'both',
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'},
		$.datepicker.regional['fr']));
	

4. Formats

The date can appear in a number of different formats with the default being 'mm/dd/yyyy'. This example shows the full format with day and month names.

...
	$('#example4').datepicker({dateFormat: 'DD, MM d, yy', showOn: 'both', 
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	

5. Date range

Pick a date range by selecting the start and end date. Several months are shown at once.

...
	$('#example5').datepicker({rangeSelect: true, numberOfMonths: 3, stepMonths: 3, 
		showOn: 'both', buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	

6. Inline

The datepicker can also appear inline and notify the page when selected.

SuMoTuWeThFrSa
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
	$('#example6').datepicker({onSelect: function(date) { alert('You selected ' + date); }});	
	

More...

The datepicker can do even more. Check out the full demonstration on the datepicker home page.