You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type 123.456 - it won't accept any fractional numbers
Expected behavior
It should work according to the documentation. Either allow 3 fractional digits by default, or the documentation should be updated to reflect the current default of 0.
The text was updated successfully, but these errors were encountered:
The default value for maxFractionDigits is "null" as seen in the "Default" column of the API. The section you quote references the formatting of the value option, not the allowed input. If you have e.g. '5.12341' in your model value and enable format it will only show '5.123' by default and only more if you increase the maxFractionalDigits parameter.
See here for an example: https://codesandbox.io/p/devbox/primevue-inputnumber-decimals-forked-xkljjv?workspaceId=5ecc5d0e-e789-4dbb-80ba-89addaa3bd1f
So by default it will format 5.12341 as 5.123 but will only allow to change it to 4 or 6, correct? I agree that I misinterpreted the documentation but still the current behavior is a bit odd.
Describe the bug
InputNumber's
maxFractionDigits
documentation says: "the default for plain number formatting is the larger of minimumFractionDigits and 3;".This is however clearly not true.
<InputNumber>
will not accept any fractional numbers unlessmaxFractionDigits
is specifically set to something.Reproducer
https://codesandbox.io/p/devbox/upbeat-darkness-j87x8q
PrimeVue version
3.29.0
Vue version
3.x
Language
ALL
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
<InputNumber v-model="value" />
Expected behavior
It should work according to the documentation. Either allow 3 fractional digits by default, or the documentation should be updated to reflect the current default of 0.
The text was updated successfully, but these errors were encountered: