MDL-39639 Formslib: Hide calendar for datetime element on disable event
authorRajesh Taneja <rajesh@moodle.com>
Tue, 14 May 2013 03:59:05 +0000 (11:59 +0800)
committerRajesh Taneja <rajesh@moodle.com>
Tue, 14 May 2013 03:59:05 +0000 (11:59 +0800)
lib/form/yui/dateselector/dateselector.js

index 5c48075..e1394f3 100644 (file)
@@ -166,6 +166,7 @@ YUI.add('moodle-form-dateselector', function(Y) {
             if (!this.enablecheckbox.get('checked')) {
                 this.calendarimage.set('disabled', 'disabled');
                 this.calendarimage.setStyle('cursor', 'default');
+                this.release_calendar();
             } else {
                 this.calendarimage.set('disabled', false);
                 this.calendarimage.setStyle('cursor', 'auto');