aboutsummaryrefslogtreecommitdiffstats
path: root/demos/datepicker
diff options
context:
space:
mode:
Diffstat (limited to 'demos/datepicker')
-rw-r--r--demos/datepicker/event-search.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/datepicker/event-search.html b/demos/datepicker/event-search.html
index 943d9bb2e..0e71100a5 100644
--- a/demos/datepicker/event-search.html
+++ b/demos/datepicker/event-search.html
@@ -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);
}
});
});