I am using datepicker of jquery for a field to set date of birth, while default picker is displayed which gives option to scroll to date monthly and sounds tedious. Is there a w
changeYear
property lets you enable a year dropdown. Also might be helpful to use yearRange
property to control number of years they see in the dropdown, by default it's from -10 to +10 years.
$('#date').datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-40:+40"
});
Details from original documentation:
The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the minDate and/or maxDate options.