-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currency mask without need to type decimal separator #733
Comments
I've added the code below to the
|
Pretty sad we have to use another projects just because ngx-mask does not care to solve this high requested problem. |
Would be very appreciated feature. |
Hi,
I'm trying to mask a value as brazilian currency. I want a mask which the user don't need to type the decimal separator (in my case, a comma) and the typed number is formatted to BRL currency automatically. For example:
Typed value > Masked value > Control value:
1 > R$ 0,01 > 0.01
10 > R$ 0,10 > 0.10
100 > R$ 1,00 > 1
123456 > R$ 1.234,56 > 1234.56
Actually, the pattern to get the control value according to typed value is a division by 100:
1 : 100 = 0.01
10 : 100 = 0.10
...
The closest I got was
but user must type the comma to have the decimal part.
Is possible to get this type of mask only with
ngx-mask
and without write some extra code?The text was updated successfully, but these errors were encountered: