I want to make date range selection using jquery-ui datepicker. First change at #dteStart succeed to set minDate at #dteEnd.
But #dteEnd failed to refresh its options on next change, if i alert
DateOptions.minDate
its value changed according to dateMin.
Maybe i miss something here...
$(document).ready(function ()
{
$("#dteStart").datepicker()
.change(function ()
{
dateStart = $(this).datepicker('getDate');
dateMin = new Date(dateStart.getTime());
dateMin.setDate(dateMin.getDate() + 1);
var DateOptions = {
dateformat: "mm/dd/yyyy",
minDate: dateMin
}
$("#dteEnd").datepicker(DateOptions);
});
});
TIA,
REV
put $("#dteEnd").datepicker("destroy");
before $("#dteEnd").datepicker(DateOptions);
and it will work fine.