Plugin Defaults
$("#example1").dropdownDatepicker();
Date Range
TO:
var maxDate = null, minDate = null,days=100;
$("#from").dropdownDatepicker({
allowPast: false,
maxDate: maxDate,
onChange: function(day, month, year){
if(day!=null && month!=null && year!=null){
$("#to").dropdownDatepicker('destroy');
minDate = year+'-'+month+'-'+day;
minDate = new Date(minDate);
minDate.setDate(minDate.getDate());
minDate = minDate.getFullYear()+'-'+(minDate.getMonth()+1)+'-'+minDate.getDate();
maxDate = new Date(minDate);
maxDate.setDate(maxDate.getDate()+days);
maxDate = maxDate.getFullYear()+'-'+(maxDate.getMonth()+1)+'-'+maxDate.getDate();
createToDate();
}
}
});
var createToDate = function(){
$("#to").dropdownDatepicker({
allowPast: false,
minDate: minDate,
maxDate: maxDate
});
}
createToDate();
Submit Format
$("#example2").dropdownDatepicker({
submitFormat: "dd/mm/yyyy"
});
Default Date
$("example3").dateDropdowns({
defaultValue: "2010-02-17"
});
Min. Age 18 (Year)
$("example4").dropdownDatepicker({
minAge: 18
});
Alternative Display Format
$("example5").dropdownDatepicker({
displayFormat: "mdy"
});
Short Month Names
$("example6").dropdownDatepicker({
monthFormat: "short"
});
Unix
$("example7").dropdownDatepicker({
submitFormat: 'unix',
defaultDateFormat: 'unix'
});
Unix Default Date
$("example8").dropdownDatepicker({
submitFormat: 'unix',
defaultDateFormat: 'unix',
defaultDate: 456692066
});
Unix Input Default Date
$("example9").dropdownDatepicker({
submitFormat: 'unix',
defaultDateFormat: 'unix'
});
Required
$("example10").dropdownDatepicker({
required: true
});
Alternative Select Labels
$("example11").dropdownDatepicker({
yearLabel: 'Anno',
monthLabel: 'Mense',
dayLabel: 'Die',
});