-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Component: p-inputNumber [min] property NaN #15659
Comments
In the demo you are able to use negative numbers without defining a min. Could you please try this and see if it works for you? |
Yes, if you don't define it, its fine. It happened for me because I wrapped the primeNG component and default value that is parsed into the primeNG component is null. |
@RogueTea Same problem here. If min is defined as : null | undefined => impossible to go below 0. Here is the stackblitz : https://stackblitz.com/edit/j7uken?file=src%2Fapp%2Finput-number-numerals-demo.html |
Same situation here with PrimeNG 17.18.11. The issue arises due to the use of the numberAttribute transformer on the min The |
Hi, I am experiencing the same issue with the _p-inputNumber_ component in PrimeNG. When I specify [min]=null, I cannot enter negative values, even if I use the arrow keys. Removing the min attribute or setting it to null does not resolve the issue. Here is the relevant code snippet: Environment:
Steps to reproduce: This should provide enough detail for others to understand and potentially reproduce the issue. |
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! |
Describe the bug
When I specify [min]=null in the p-inputNumber component, this happens:
NaN is set instead of null. I can not enter negative values anymore unless I use the arrow keys.
Environment
I am using regular Angular with PrimeNG
Reproducer
No response
Angular version
17.3.5
PrimeNG version
17.15.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.2
Browser(s)
Chrome
Steps to reproduce the behavior
<p-inputNumber
mode="currency"
locale="de-DE"
[min]="null"
currency="EUR"
[ngModel]="null"
Now try to add a negative value without using the step buttons or arrow keys
Expected behavior
if null is specified in the "min" property, you should be able to add negative values.
The text was updated successfully, but these errors were encountered: