MDL-74110 forms: disable calendar link when date selector disabled.

This commit is contained in:
Paul Holden 2022-03-18 11:32:40 +00:00
parent 0d0f09bc7f
commit ec89abc5bf
4 changed files with 16 additions and 16 deletions

View File

@ -360,14 +360,14 @@ CALENDAR.prototype = {
}
},
toggle_calendar_image: function() {
// If the enable checkbox is det checked, disable the image.
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
if (!this.enablecheckbox.get('checked')) {
this.calendarimage.set('disabled', 'disabled');
this.calendarimage.setStyle('cursor', 'default');
this.calendarimage.addClass('disabled');
this.calendarimage.setAttribute('tabindex', -1);
this.release_calendar();
} else {
this.calendarimage.set('disabled', false);
this.calendarimage.setStyle('cursor', null);
this.calendarimage.removeClass('disabled');
this.calendarimage.setAttribute('tabindex', 0);
}
}
};

File diff suppressed because one or more lines are too long

View File

@ -360,14 +360,14 @@ CALENDAR.prototype = {
}
},
toggle_calendar_image: function() {
// If the enable checkbox is det checked, disable the image.
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
if (!this.enablecheckbox.get('checked')) {
this.calendarimage.set('disabled', 'disabled');
this.calendarimage.setStyle('cursor', 'default');
this.calendarimage.addClass('disabled');
this.calendarimage.setAttribute('tabindex', -1);
this.release_calendar();
} else {
this.calendarimage.set('disabled', false);
this.calendarimage.setStyle('cursor', null);
this.calendarimage.removeClass('disabled');
this.calendarimage.setAttribute('tabindex', 0);
}
}
};

View File

@ -152,14 +152,14 @@ CALENDAR.prototype = {
}
},
toggle_calendar_image: function() {
// If the enable checkbox is det checked, disable the image.
// If the enable checkbox is not checked, disable the calendar image and prevent focus.
if (!this.enablecheckbox.get('checked')) {
this.calendarimage.set('disabled', 'disabled');
this.calendarimage.setStyle('cursor', 'default');
this.calendarimage.addClass('disabled');
this.calendarimage.setAttribute('tabindex', -1);
this.release_calendar();
} else {
this.calendarimage.set('disabled', false);
this.calendarimage.setStyle('cursor', null);
this.calendarimage.removeClass('disabled');
this.calendarimage.setAttribute('tabindex', 0);
}
}
};