InputNumber behaves odd when trying to insert fracitonal digits #1441
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
The InputNumber component does not allow to conveniently insert fractional zeros. Instead, it replaces or discards fraction digits when trying to insert 0 in the fractional part. It also prevents entering trailing zeros.
Example for the "Min-Max Fraction Digits" showcase at https://www.primefaces.org/primevue/showcase/#/inputnumber and an initial value of
2.351,35
:Trying to enter a trailing zero does not modify the value at all, which prevents the user from entering a number like
2.351,3501
. Note that any number other than 0 may be entered successfully.It is also not possible to change the initial value from
2.351,35
to2.351,305
straightforward since inserting a zero in the second fractional position replaces the current digit in that position rather than inserting a new one. This particularly becomes clear when trying to enter a value like2.351,30005
: One needs to enter2.351,3XXX5
in the first place (where X is any number other than zero) and replace the X digits with zeros afterwards. Entering the number directly is not possible.Replacing existing digits at the cursor position may be convenient in some cases. However, it should be possible to turn off this behaviour to allow the user to insert any digit (including zeros) at any position as it would be possible in a traditional text field.
The text was updated successfully, but these errors were encountered: