Merge branch 'MDL-42587_25' of git://github.com/aolley/moodle into MOODLE_25_STABLE
This commit is contained in:
+7
-1
@@ -137,10 +137,16 @@ YUI.add('moodle-form-dateselector', function(Y) {
|
||||
var year = parseInt(this.yearselect.get('value'));
|
||||
var month = parseInt(this.monthselect.get('value')) - 1;
|
||||
var day = parseInt(this.dayselect.get('value'));
|
||||
M.form.dateselector.calendar.select(new Date(year, month, day));
|
||||
var date = new Date(year, month, day);
|
||||
M.form.dateselector.calendar.select(date);
|
||||
M.form.dateselector.calendar.setMonth(month);
|
||||
M.form.dateselector.calendar.setYear(year);
|
||||
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.
|
||||
this.dayselect.set('value', date.getDate());
|
||||
this.monthselect.set('value', date.getMonth() + 1);
|
||||
}
|
||||
},
|
||||
set_selects_from_date : function(eventtype, args) {
|
||||
var date = args[0][0];
|
||||
|
||||
Reference in New Issue
Block a user