From 2ebe15ee7d30c4658709d78468dccefb73abad41 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Sun, 15 Mar 2009 14:32:21 +0000 Subject: datepicker demo: improved to respect dateFormat when setting min/maxDate; datepicker still needs a lot of work --- demos/datepicker/event-search.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'demos/datepicker') 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); } }); }); -- cgit v1.2.3