MDL-86765 forms: disable calendar icon if element disabled.
This is similar to change in ec89abc5 which updated the icon state
if the corresponding checkbox was unchecked. Here we're doing the
same if the entire date/time element itself is disabled.
This commit is contained in:
+1
-1
@@ -380,7 +380,7 @@ CALENDAR.prototype = {
|
||||
},
|
||||
toggle_calendar_image: function() {
|
||||
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
|
||||
if (!this.enablecheckbox.get('checked')) {
|
||||
if (!this.enablecheckbox.get('checked') || this.enablecheckbox.get('disabled')) {
|
||||
this.calendarimage.setAttribute('disabled');
|
||||
this.release_calendar();
|
||||
} else {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -380,7 +380,7 @@ CALENDAR.prototype = {
|
||||
},
|
||||
toggle_calendar_image: function() {
|
||||
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
|
||||
if (!this.enablecheckbox.get('checked')) {
|
||||
if (!this.enablecheckbox.get('checked') || this.enablecheckbox.get('disabled')) {
|
||||
this.calendarimage.setAttribute('disabled');
|
||||
this.release_calendar();
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ CALENDAR.prototype = {
|
||||
},
|
||||
toggle_calendar_image: function() {
|
||||
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
|
||||
if (!this.enablecheckbox.get('checked')) {
|
||||
if (!this.enablecheckbox.get('checked') || this.enablecheckbox.get('disabled')) {
|
||||
this.calendarimage.setAttribute('disabled');
|
||||
this.release_calendar();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user