From 1d128663f69be8b60fc28b6b7732acd24d800a98 Mon Sep 17 00:00:00 2001 From: Jerome Mouneyrac Date: Thu, 6 Mar 2014 11:35:00 +0800 Subject: [PATCH] MDL-32917 YUI2 to YUI3 Calendar port: only display the date from the matching selector and display the month/year matching the selector value --- .../moodle-form-dateselector-debug.js | Bin 12874 -> 12870 bytes .../moodle-form-dateselector-min.js | Bin 6667 -> 6668 bytes .../moodle-form-dateselector.js | Bin 12874 -> 12870 bytes lib/form/yui/src/dateselector/js/calendar.js | 4 ++-- 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-debug.js index 296abc15c698161b11bf6a6158d085b9e314e206..94698c8ae6a5f02ad67e728575a569b7650162bd 100644 GIT binary patch delta 50 zcmX?=ax7&-xCU=ZYH?~#YI2E7Vo7T87d+J0}43 CHW8Nq delta 50 zcmX?>aw=s*xW?pO4SU|){JfG3B^?DYJ$b%{E_Y>WVi8aPL`~M$(AfN6!<`cV@sbjB diff --git a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-min.js b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector-min.js index 3617fdbe3a6f54f5f1f7959583e220ac9a7f856f..810a19778333a0832a64812904916021617f253f 100644 GIT binary patch delta 47 zcmeA+=`q=`S(q;+wKz2=HMztku_U!vWAZy;#mQTR4cSwGTqT_%AYXp7g~(-A0I_@# AmH+?% delta 44 ycmeA%={DK0S$OgTVPlTm{JfG3C7qJV2Za^6N;H%zQxl7nbW(v_`OTIhmstUEY7emh diff --git a/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js b/lib/form/yui/build/moodle-form-dateselector/moodle-form-dateselector.js index 296abc15c698161b11bf6a6158d085b9e314e206..94698c8ae6a5f02ad67e728575a569b7650162bd 100644 GIT binary patch delta 50 zcmX?=ax7&-xCU=ZYH?~#YI2E7Vo7T87d+J0}43 CHW8Nq delta 50 zcmX?>aw=s*xW?pO4SU|){JfG3B^?DYJ$b%{E_Y>WVi8aPL`~M$(AfN6!<`cV@sbjB diff --git a/lib/form/yui/src/dateselector/js/calendar.js b/lib/form/yui/src/dateselector/js/calendar.js index 5452c292131..4ef3dbfbaeb 100644 --- a/lib/form/yui/src/dateselector/js/calendar.js +++ b/lib/form/yui/src/dateselector/js/calendar.js @@ -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. -- 2.43.0