-
Notifications
You must be signed in to change notification settings - Fork 301
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
Simple Decimal Mask Not working! #848
Comments
faced the same issue for mask="999 999 999.00" |
@Maks-Yaremenko someone needs to fix this, but if you need a workaround, i got this to work for me, maybe you can tweak it for you?
seeing no response here I posted it on SO and Ashot Aleqsanyan was kind enough to provide this workaround. |
@sajjansarkar yeah! thanks, buddy! It partially solves my issue, ideally whenever the separator limit reached I'm expecting the mask should set a dot instead of just disallow typing. Anyhow it definitely better than it was implemented in our app before)) For example in the case of mask 999.99, the user was able to type 999.99 OR 99999 what was invalid)) now he can type only 999, and then in the case of putting dot able to add .99 Thanks one more time! |
@sajjansarkar @Maks-Yaremenko Thank you that using our plugin. . Yes better will be to use mask separator . But currently we fixed behaviour please check version >13.1.5 |
I'm facing with the same issue using comma as decimalMarker. For instance mask='99999,00' for input 109.3645 format it as 109.3,36. For mask 99999.00 works fine. Also the changes that were made in 13.1.5 don't affect mask 0999.00, only 9999.00. |
🐞 bug report
Is this a regression?
Not sure, I have an example using version 8.0.1 which works but that's Angular 8
Description
I would like a textbox that allows only 2 decimals. This example ( using Angular 8 and an older mask version ) works , but the newer version doesnt!
<input type="text" mask="99999999999999.00">
🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-mask-9g3gqs?file=src%2Fapp%2Fapp.component.html
🔥 Exception or Error
Pressing a dot makes it enter 2 dots. Subsequent numbers look replicated and wrong.
🌍 Your Environment
Angular Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: