Skip to content
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

Reactive Forms Decimal Mask Issue when data type is Number #736

Closed
tapoinde opened this issue Apr 29, 2020 · 2 comments
Closed

Reactive Forms Decimal Mask Issue when data type is Number #736

tapoinde opened this issue Apr 29, 2020 · 2 comments

Comments

@tapoinde
Copy link

I see an issue when using reactive forms and using decimals. If the initial value is a string, the input works correctly. However, if the initial value is a Number, the behavior changes.

When a string, you are allowed to type 0.1 in order, everything seems to be OK.

When a Number, if the first digit is 0, it will reverse your entry. For example, entering 0.1 results in 1.0.

Example: https://stackblitz.com/edit/angular-qvvr2w

@acurrieclark
Copy link

Setting the input type to number fixed this for me

@andriikamaldinov1
Copy link
Collaborator

@tapoinde Thanks for your using Ngx-Mask. Please update to latest version.
It example, all work as expected - https://stackblitz.com/edit/angular-9t76kf?file=src%2Fmain.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants