mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
datepicker demo: improved to respect dateFormat when setting min/maxDate; datepicker still needs a lot of work
This commit is contained in:
@@ -15,7 +15,9 @@
|
||||
numberOfMonths: 3,
|
||||
onSelect: function(selectedDate) {
|
||||
var option = this.id == "from" ? "minDate" : "maxDate";
|
||||
dates.not(this).datepicker("option", option, new Date(selectedDate));
|
||||
var instance = $(this).data("datepicker");
|
||||
var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
|
||||
dates.not(this).datepicker("option", option, date);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user