Skip to content
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

Open
danielvieira1 opened this issue May 22, 2024 · 2 comments
Open

Component: p-inputNumber [min] property NaN #15659

danielvieira1 opened this issue May 22, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@danielvieira1
Copy link

Describe the bug

When I specify [min]=null in the p-inputNumber component, this happens:
image

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.

@danielvieira1 danielvieira1 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 22, 2024
@RogueTea
Copy link
Contributor

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?

@danielvieira1
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants