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:
Paul Holden
2025-11-11 12:49:46 +00:00
parent 7838e3f247
commit 84caa44014
4 changed files with 4 additions and 4 deletions
@@ -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 {
File diff suppressed because one or more lines are too long
@@ -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
View File
@@ -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 {