MDL-32917 YUI2 to YUI3 Calendar port: only display the date from the matching selecto...
authorJerome Mouneyrac <jerome@mouneyrac.com>
Thu, 6 Mar 2014 03:35:00 +0000 (11:35 +0800)
committerJerome Mouneyrac <jerome@mouneyrac.com>
Thu, 6 Mar 2014 03:35:00 +0000 (11:35 +0800)
lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js
lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-min.js
lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js
lib/form/yui/src/dateselector/js/calendar.js

index 296abc1..94698c8 100644 (file)
Binary files a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js and b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js differ
index 3617fdb..810a197 100644 (file)
Binary files a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-min.js and b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-min.js differ
index 296abc1..94698c8 100644 (file)
Binary files a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js and b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js differ
index 5452c29..4ef3dbf 100644 (file)
@@ -115,9 +115,9 @@ CALENDAR.prototype = {
         var month = parseInt(this.monthselect.get('value'), 10) - 1;
         var day = parseInt(this.dayselect.get('value'), 10);
         var date = new Date(year, month, day);
+        M.form.dateselector.calendar.deselectDates();
         M.form.dateselector.calendar.selectDates([date]);
-        M.form.dateselector.calendar.set("month", month);
-        M.form.dateselector.calendar.set("year", year);
+        M.form.dateselector.calendar.set("date", date);
         M.form.dateselector.calendar.render();
         if (date.getDate() !== day) {
             // Must've selected the 29 to 31st of a month that doesn't have such dates.