p-inputnumber: Not allowing to start the decimal with DOT(.)
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.
Environment
All
Reproducer
https://stackblitz.com/edit/inputnumber-github-hhjujy-qamqwj?file=src%2Fapp%2Fapp.component.html
Angular version
17.3.12
PrimeNG version
17.18.9
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues 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 .)
I have to add my support to this problem. This particular issue is driving my users CRAZY and although it's a seemingly minor behaviour problem it seems to be a major pain point amongst our community.
I am using the latest version of 17.18.9 still, we are facing the issues. Any workarounds or solutions to fix this
@wcroteau Do you have any work around or solutions to fix this in Primeng?
Hi,
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation and try the latest PrimeNG version(v19). If there is no improvement on this, can you open a new issue so we can include it in our roadmap?
Thanks a lot for your understanding! Best Regards,
@mertsincan Thank you for the response, Have tried with the latest Primeng version (V19), there is no fix for this. Will open the issue again.
Here is the new Issue - https://github.com/primefaces/primeng/issues/17226
This still seems to be occurring.... or has re-occurred.
https://primeng.org/inputnumber Go to the 'Min-Max Fraction Digits' under 'Numerals'... cant start the number with a .
I came here because Im having this issue in my app.
(i jsut saw the post above.. will go there. sorry.)