I am using jqueryUI datepicker for a reservation form. here's the almost intact code from datepicker with date-range
$(function() {
var dates = $( "#from, #to" ).datepicker({
dateFormat: 'dd-mm-yy',
minDate: "+0D",
defaultDate: "+0D",
changeMonth: true,
numberOfMonths: 1,
onSelect: function( selectedDate ) {
var option = this.id == "from" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" ),
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates.not( this ).datepicker( "option", option, date );
}
});
});
the way it works now: when i select a date on the first box, the minimum date on the second box is automatically set at that date.
i want it to move to the next day.
say i pick 1/1/2010 on the first box, i want the first available date on the sencond box to be 2/1/2010 (d/m/yyyy format)
i cant figure it out, any help would be greatly appreciated