jQuery datepick pre select the year to show all months and days -
i have jquery datepicker
changemonth: true, changeyear: true, numberofmonths: 1, dateformat: "dd-mm-yy", mindate: "-150y", maxdate: "-18y", yearrange: '1900:1995'
which shows date range of min 18 years old default calendar blocks out days , months less 18 years. confusing customers don't realise if born in month after current 18 year restriction select year month day.
my question is, there way preset year dropdown 1 year greater 18 months , days shown?
so default selections jul 1995 default selections july 1994.
thanks
this default date 19 years today. (use defaultdate
option) (http://api.jqueryui.com/datepicker/#option-defaultdate)
$(function() { $("#txtdateofbirth").datepicker({ showon: "both", buttonimage: "img/iconography/date-picker-icon.png", buttonimageonly: true, changemonth: true, changeyear: true, numberofmonths: 1, dateformat: "dd-mm-yy", mindate: "-100y", maxdate: "-18y", defaultdate: "-19y" // <<<<<< }); });
Comments
Post a Comment