-
Notifications
You must be signed in to change notification settings - Fork 298
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
When I use mask="delimiter.2" and delimiter="." default shows with comma. Angular 13 #1009
Comments
It might be related to this Where maskService.numberToString converts using with the browser's local instead of the specified configuration for decimal and thousand separators |
this fix might help, this was committed after the upgrade to angular 14 could someone please try to release a patch for angular 13 version? UPDATE: commit doesn't help |
we have a possible fix in our fork in our v13-hotfix branch:
please have a look, since our issue isn't exactly as the one described here our problem was:
once all good and happy with our own software, we'll try to find the time to submit a PR here so far didn't find a way to mock brower locale in the unit tests, but added a showcase to reproduce the bug (or check that it is fixed) note: for now that's all in our fork's v13-hotfix branch, but we'll upgrade to angular 14 at some point, so we'll probably have something similar in develop branch |
Hello, Same report here with 'separator', the following use case worked in v12 but fails in v13 & v14 When user's browser language is in 'fr' input: <input mask="separator.2" [(ngModel)]="value"><br/>
pipe: {{value | mask:'separator.2'}} Then browser should display:
but since v13, the input value in browser is It's maybe due to https://github.com/JsDaddy/ngx-mask/blob/develop/projects/ngx-mask-lib/src/lib/mask.service.ts#L246 since in those browser Should 'fullwide' could be replaced by 'en-US' instead, since |
@zsaidov: issue is present since angular 13, and is also there for angular 14 (develop branch has upgraded), can you please update the title so it reflect that? @StephaneVa: suggestion to use let's see how #1052 turns out (in the meantime we're using our fork https://github.com/kwsoft/ngx-mask) |
@mrpia Your request merged. Thank you for contributing. |
🐞 bug report
Description
I used a mask like this:
<input autocomplete="off" type="text" decimalMarker="." mask="separator.2">
add data via reactive forms:
🔥 Exception or Error
shows like this:
Also write text after the number will remove those numbers
🌍 Your Environment
Angular Version:
Everything works fine in this version.
"ngx-mask": "^12.0.0"
The text was updated successfully, but these errors were encountered: