p-inputnumber: Not allowing to start the decimal with DOT(.)
Reopened the ticket - https://github.com/primefaces/primeng/issues/16069
Describe the bug
Describe the bug <p-inputNumber [min]="1" [max]="24" [minFractionDigits]="1" [maxFractionDigits]="2"
In the above input number,
Below cases are working
If i am trying to enter 0.5, it is working if I am trying to enter 5.75 it is working Case which is not working. if i am trying to enter as .5, i can see only 5 (dot is missing) if we need dot, we need to start with 0.
Tried same thing in primeng component as well- https://primeng.org/inputnumber
Pull Request Link
No response
Reason for not contributing a PR
- [ ] Lack of time
- [ ] Unsure how to implement the fix/feature
- [ ] Difficulty understanding the codebase
- [ ] Other
Other Reason
No response
Reproducer
https://stackblitz.com/edit/inputnumber-github-hhjujy-qamqwj?file=src%2Fapp%2Fapp.component.html
Environment
All
Angular version
17.3.12
PrimeNG version
v19
Node version
20.12.2
Browser(s)
Chrome
Steps to reproduce the behavior
Go to the text box enter the value as .5, your will see as 5
Expected behavior
Go to the text box enter the value as .5, your have to see as .5 or 0.5 (auto prefixed with 0 if it started with .)
@mertsincan for your reference, creating the issue.
Thanks a lot for the update!
Same issue still exists, basically makes this component unusable for my users as they don't enter the leading 0.
Would love to get this added. Would be great to allow users to enter decimals without a leading zero
yea no one types 0 before entering a decimal... this is a big problem.