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

p-inputnumber: Not allowing to start the decimal with DOT(.) #16069

Closed
RanjithkumarRajendran opened this issue Jul 19, 2024 · 4 comments
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@RanjithkumarRajendran
Copy link

RanjithkumarRajendran commented Jul 19, 2024

Describe the bug

<p-inputNumber
[min]="1"
[max]="24"
[minFractionDigits]="1"
[maxFractionDigits]="2"

In the above input number,

Below cases are working

  1. If i am trying to enter 0.5, it is working
  2. 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

  1. Go to the text box
  2. enter the value as .5, your will see as 5

Expected behavior

  1. Go to the text box
  2. enter the value as .5, your have to see as .5 or 0.5 (auto prefixed with 0 if it started with .)
@RanjithkumarRajendran RanjithkumarRajendran added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 19, 2024
@wcroteau
Copy link

wcroteau commented Aug 2, 2024

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.

@RanjithkumarRajendran
Copy link
Author

I am using the latest version of 17.18.9 still, we are facing the issues. Any workarounds or solutions to fix this

@RanjithkumarRajendran
Copy link
Author

@wcroteau Do you have any work around or solutions to fix this in Primeng?

@mertsincan
Copy link
Member

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,

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

3 participants