Date Drop Down Lists

JQuery Plugins

This JQuery plugin converts a textfield with date value into a set of drop down lists for day, month and year.

Demo

When applied, the original textfield is replaced by a set of drop down lists, but it's value can still be referenced by the original ID:

Field Value

Code

$(function () {
	$('#fld_id').dateDropDowns({ dateFormat: 'DD-mm-yy' });
});

Options

  • dateFormat
    • Determines the layout of the date
    • 'dd-mm-yy', 'mm-dd-yy', use MM or DD for 2 digit values.
  • monthNames
    • Array of month labels
  • yearStart / yearEnd
    • Integer value for start and end years.
$('#fld_id').dateDropDowns({
	dateFormat:'DD-mm-yy',
	monthNames:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], 
 yearStart:'1979', yearEnd:'2011'
});

Download

comments powered by Disqus