You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
When setting the [disabled]="myBoolean" attribute on the <input> item, the input is successfully disabled, but the <mat-datepicker-toggle> appears to still be a clickable item. If I toggle the myBoolean variable from true, to false, and back to true, the toggle will realize it's supposed to be disabled and will render correctly.
Example code below:
<!-- Expire on Change -->
<mat-checkbox [(ngModel)]="expireOnChange">Expire on Status Change</mat-checkbox>
<!-- Date Input -->
<mat-form-field style="margin-top:1em" appearance="outline" color="accent">
<mat-label>Expiration Date & Time</mat-label>
<input [disabled]="expireOnChange" matInput readonly type="datetime" [matDatepicker]="picker" [(ngModel)]="expiration" />
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker type="datetime" clockStep="5" #picker></mat-datepicker>
</mat-form-field>
Image from when Dialog appears (notice the toggle is white instead of gray):
The text was updated successfully, but these errors were encountered:
andy-bond
changed the title
Dynamically Changing Disabled Attribute Fails to Visually Update Toggle Button
Dynamically Changing Disabled Attribute Fails to Visually Update Toggle Button on First Load
Jul 3, 2018
When setting the
[disabled]="myBoolean"
attribute on the<input>
item, the input is successfully disabled, but the<mat-datepicker-toggle>
appears to still be a clickable item. If I toggle themyBoolean
variable fromtrue
, tofalse
, and back totrue
, the toggle will realize it's supposed to be disabled and will render correctly.Example code below:
Image from when Dialog appears (notice the toggle is white instead of gray):
The text was updated successfully, but these errors were encountered: