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:41 +00:00
parent 41a6ad6cd2
commit 068bd1464c
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 {