ngx-mask
ngx-mask copied to clipboard
"0" pattern followed by a "9" optional pattern (09) allows comma and dot after the "0" pattern
Example
https://stackblitz.com/edit/angular-211yuk https://angular-211yuk.stackblitz.io
Problem
If you use a mask with the pattern "09*"
it will allow a ,
or .
after the first number
If you use a mask with the pattern "00009*"
it will allow a ,
or .
after the forth number.
Expected Behavior
The mask should not allow a comma or dot after the mandatory number 0
.
The same issue. all '9' chars can be replaced with dot. I tried to reproduce the issue with 6.1 version, that version works correctly. Waiting for fix... It breaks all masks in product.
h 6.1
I tested it and the version 7.9.10 works correctly too.
I am experiencing the same issue, even the temporary solution won't work for me.
<input [(ngModel)]="startDate" mask="09/09/0099" />
Inputs: 1/1/2020 11122020 1/1/20
expected output 1/1/2020 11/12/2020 1/1/20
Output
1//1//2020 11/12/2020 1//1//20
https://stackblitz.com/edit/angular-ivy-zqzaez?file=src%2Fapp%2Fapp.component.html
Angular version: 12, ngx-mask version: 12
Let me know if someone finds a solution.
I tried this in ngx-mask version 7.9 and it works correctly. Here is the stackblitz: https://stackblitz.com/edit/angular-ufuneg?file=src%2Fapp%2Fapp.module.ts
@MatMercer @alexermolov Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-pzr1tc?file=src%2Fmain.ts