-
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 not accepting decimal input with mode="decimal" and minFractionDigits="0" #1881
Comments
|
Hi @tugcekucukoglu - your description explains the reason for the issue described, but I think it is still an issue. There are cases where you do not want to show a decimal place by default, but still allow the user to enter one. I am a little confused because #1136 described the requirement, and a milestone was added, but for InputNumber is still to be integer only and minFractionDigits=0 does not add optional fraction digits. |
Thank you @dashavoo, that is exactly the problem I am seeing. It seems like this has been mentioned in a couple different places but has not been addressed yet. |
I agree with above sentiment. I want to be able to add a decimal, but I don't want to be forced to display ".00" all the time. |
This is the first search result, so commenting for others. I get the desired completely-optional decimal place behaviour with: <InputNumber mode="decimal" max-fractional-digits="3" /> |
Current behavior
When entering values into with
mode="decimal"
:minFractionDigits="0"
:maxFracionDigits greater than 2
It is not possible to enter enter any decimal values into the InputNumber box.
Expected behavior
After pressing the period button, '.' , I would expect the decimal separator to be added and the next numbers types should then be the decimal numbers.
Minimal reproduction of the problem with instructions
Add a InputNumber box such as:
Then attempt to enter 123.45. The InputNumber box will not allow decimals.
Vue version: 3.X
"vue": "^3.0.11",
PrimeVue version: 3.4.X
"primevue": "3.4.0",
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Firefox 95.0
The text was updated successfully, but these errors were encountered: