ngx-mask
ngx-mask copied to clipboard
Mask percentage not work correctly
In version 10.0.1 I can't use mask="percent.2" to mask percent. This is my input field: <input matInput placeholder="Cash Discount" formControlName="cashDiscount" mask="percent.2" suffix="%" [dropSpecialCharacters]="false" /> It throw an error when I input something, and I also can't get this input value in type number. Anyone can help???
I faced a similar problem. When I use the "percent" mask everything works fine. But if I try to add a mask with a sign after the comma ("percent.0", "percent.1", "percent.2" etc.), then the input is always invalid.
@oleksandr-kupenko @thangnguyen5201 Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-7gcplg?file=src%2Fmain.ts