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(.) #17226

Open
4 tasks
RanjithkumarRajendran opened this issue Dec 27, 2024 · 2 comments · May be fixed by #17239
Open
4 tasks

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

RanjithkumarRajendran opened this issue Dec 27, 2024 · 2 comments · May be fixed by #17239
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@RanjithkumarRajendran
Copy link

RanjithkumarRajendran commented Dec 27, 2024

Reopened the ticket - #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 .)

@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 Dec 27, 2024
@RanjithkumarRajendran
Copy link
Author

@mertsincan for your reference, creating the issue.

@mertsincan
Copy link
Member

Thanks a lot for the update!

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 27, 2024
@mertsincan mertsincan added this to the 19.0.4 milestone Dec 27, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

Successfully merging a pull request may close this issue.

2 participants