-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
InputNumber: Incorrect formatting when in decimal mode with a suffix (maybe all the time) #3382
Comments
Similar issue in PrimeReact: primefaces/primereact#2871 |
When typing 2000 with suffix in the InputNum it shows 20.000. And when I type a long number it shows 0 instead of the number I had typed. |
When typing 2000 in currency mode, it formats to 20 000 €. Example : <InputNumber v-model="nocents" locale="fr-FR" mode="currency" currency="EUR" :min-fraction-digits="0" :max-fraction-digits="0" placeholder="Cents are not allowed..."/> This does not occur when you remove min/max fraction digits props. |
We also have problems with this, do we really need to wait for 3.x for this to be fixed? |
You can test the bug directly on primevue website : Use the germany field in Euro. |
Test Ko in 3.29.1 Steps to reproduce
|
Describe the bug
It seems that when formatting an input number the logic is wrong, the method:
concatValues
here. Has an issue when it calcalates val1 it determines 5 and then val2 is 05 so it works out to 5 + 5 + suffix whereas it should be 0 + 5 + suffix. It should be 0 + 5 + suffix. Hope that makes sense.We have this issue with vite, but I can also see it's an issue on the main website which uses the vue cli.
Reproducer
https://www.primefaces.org/primevue/inputnumber
PrimeVue version
3.20.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
Any
Steps to reproduce the behavior
Go to the temperature input in the docs and select all, and type 05 and it will replace it with 55.
Expected behavior
When typing 05 for it stay 05 not 55.
The text was updated successfully, but these errors were encountered: