mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
Merge branch 'MDL-39581_master' of https://github.com/markn86/moodle
This commit is contained in:
commit
2c59e0ffaa
14
lib/form/yui/dateselector/dateselector.js
vendored
14
lib/form/yui/dateselector/dateselector.js
vendored
@ -97,7 +97,7 @@ YUI.add('moodle-form-dateselector', function(Y) {
|
||||
focus_event : function(e) {
|
||||
M.form.dateselector.cancel_any_timeout();
|
||||
// If the current owner is set, then the pop-up is currently being displayed, so hide it.
|
||||
if (M.form.dateselector.currentowner) {
|
||||
if (M.form.dateselector.currentowner == this) {
|
||||
this.release_calendar();
|
||||
} else if ((this.enablecheckbox == null)
|
||||
|| (this.enablecheckbox.get('checked'))) { // Must be hidden. If the field is enabled display the pop-up.
|
||||
@ -116,8 +116,16 @@ YUI.add('moodle-form-dateselector', function(Y) {
|
||||
},
|
||||
claim_calendar : function() {
|
||||
M.form.dateselector.cancel_any_timeout();
|
||||
this.connect_handlers();
|
||||
this.set_date_from_selects();
|
||||
if (M.form.dateselector.currentowner == this) {
|
||||
return;
|
||||
}
|
||||
if (M.form.dateselector.currentowner) {
|
||||
M.form.dateselector.currentowner.release_calendar();
|
||||
}
|
||||
if (M.form.dateselector.currentowner != this) {
|
||||
this.connect_handlers();
|
||||
this.set_date_from_selects();
|
||||
}
|
||||
M.form.dateselector.currentowner = this;
|
||||
M.form.dateselector.calendar.cfg.setProperty('mindate', new Date(this.yearselect.firstOptionValue(), 0, 1));
|
||||
M.form.dateselector.calendar.cfg.setProperty('maxdate', new Date(this.yearselect.lastOptionValue(), 11, 31));
|
||||
|
Loading…
x
Reference in New Issue
Block a user