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
I am on Angular 14 and the min and max attributes do not work. Changing the type and inputmode of the input field does not have any effect. The error I get is:
Type 'string' is not assignable to type 'number'.ngtsc(2322)
I am using this on a an input field connected to a FormControl, so via Reactive Forms not Template Driven Forms.
The text was updated successfully, but these errors were encountered:
Same issue here. min and max attributes are only supported on input controls with type="number" (and a few other types) but not type="string", which is the default when you don't supply a type and is the type required for currencyMask to work correctly.
Here's an example that will cause this error, and min/max do not work: <input name="customercost" min="0" max="500" [(ngModel)]="cost" matInput required currencyMask />
If I remove currencyMask and change type="number", then min and max work correctly: <input name="customercost" min="0" max="500" [(ngModel)]="cost" matInput required type="number" />
I am on Angular 14 and the
min
andmax
attributes do not work. Changing thetype
andinputmode
of the input field does not have any effect. The error I get is:Type 'string' is not assignable to type 'number'.ngtsc(2322)
I am using this on a an input field connected to a
FormControl
, so via Reactive Forms not Template Driven Forms.The text was updated successfully, but these errors were encountered: