ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

using unlimited decimal values with coma_separator or dot_separator

Open malbarmavi opened this issue 7 years ago • 1 comments

I try to use coma_separator. and I need to be able to enter decimals value base on the documentation

For using decimals enter '.' to the end of your input to 'separator' or 'coma_separator' mask and ',' to 'dot_separator'

So this way I was prevented from entry . dot <input type='text' mask="cmoa_separator." formControlName="number" > this way will work for me limit to 25 characters but this related to another issue <input type='text' mask="coma_separator.25" formControlName="number" > if I use dot_separator. I was able to enter decimal part but 955.100 become 955100

stackblitz example

malbarmavi avatar Feb 20 '19 13:02 malbarmavi

@malbarmawi hello, you should add dot/coma for decimals not in mask expression. In your input type dot/coma when you want to use decimals. If you want 955.100 such output in ngmodel you need to use this - [dropSpecialCharacters]="true"

Thegrep01 avatar Mar 11 '19 10:03 Thegrep01