Closed ischerf-buhl closed 1 year ago
No. As leadZero is involved and that is quite new as I understand it.
When using this specific combination of settings and value, the displayed value is simply empty.
Use mask='separator.n', make use decimalMarker with the German ',' and use leadZero. Have your browser run in English.
<input type="text" mask="separator.2" [ngModel]="val" decimalMarker="," [leadZero]="true" /> https://stackblitz.com/edit/angular-hckbzh?file=src%2Fmain.ts
<input type="text" mask="separator.2" [ngModel]="val" decimalMarker="," [leadZero]="true" />
Angular Version: Local environment: 16.1 Stackblitz example: 16.2
System: Windows 10
Browser: Firefox (116) The language of the browser seems to be the important part though.
Anything else relevant?
If the value entered does not have any decimals, the value is displayed.
Also, if you enter a value manually to field it seems to work - just the initial setup is broken.
@ischerf-buhl Thanks for using Ngx-Mask. Please update to latest version. All work as expected - https://stackblitz.com/edit/angular-nyfyq6?file=src%2Fmain.ts
π bug report
Is this a regression?
No. As leadZero is involved and that is quite new as I understand it.
Description
When using this specific combination of settings and value, the displayed value is simply empty.
π¬ Minimal Reproduction
Use mask='separator.n', make use decimalMarker with the German ',' and use leadZero. Have your browser run in English.
<input type="text" mask="separator.2" [ngModel]="val" decimalMarker="," [leadZero]="true" />
https://stackblitz.com/edit/angular-hckbzh?file=src%2Fmain.tsπ Your Environment
Angular Version: Local environment: 16.1 Stackblitz example: 16.2
System: Windows 10
Browser: Firefox (116) The language of the browser seems to be the important part though.
Anything else relevant?
If the value entered does not have any decimals, the value is displayed.
Also, if you enter a value manually to field it seems to work - just the initial setup is broken.