aboutsummaryrefslogtreecommitdiffstats
path: root/demos/datepicker
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2009-03-15 14:32:21 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2009-03-15 14:32:21 +0000
commit2ebe15ee7d30c4658709d78468dccefb73abad41 (patch)
tree865b8d57ba018c39d9c1fdd67903b34bbd2e429e /demos/datepicker
parentd9b69be03f0a22be76daf67be61311ac3f7f1a21 (diff)
downloadjquery-ui-2ebe15ee7d30c4658709d78468dccefb73abad41.tar.gz
jquery-ui-2ebe15ee7d30c4658709d78468dccefb73abad41.zip
datepicker demo: improved to respect dateFormat when setting min/maxDate; datepicker still needs a lot of work
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);
}
});
});