primeng icon indicating copy to clipboard operation
primeng copied to clipboard

P Input number not allowing big values (reopened issue)

Open albertB4work opened this issue 10 months ago • 3 comments

Describe the bug

This is a reopen issue to the closed issue

The InputNumber Component overwrites input with wrong values when the number gets too big (over 9999999999999998). Next Digit that is inputted gets increased by one. Subsequent inputs are replaced with 0. When input [format] is set to false it will at some point format to scientific notation and then 'Infinity'.

You mentioned that it could cause breaking changes but why don't you create a copy of the component but adressed to bigInt numbers? Like a P-Input-BigInt or something like that

Pull Request Link

No response

Reason for not contributing a PR

  • [x] Lack of time
  • [ ] Unsure how to implement the fix/feature
  • [ ] Difficulty understanding the codebase
  • [ ] Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/zuhepy?file=src%2Fapp%2Fdemo%2Finput-number-numerals-demo.html,src%2Fapp%2Fdemo%2Finput-number-numerals-demo.ts,package.json

Environment

...

Angular version

19.x

PrimeNG version

v19

Node version

10.9.1

Browser(s)

Google chrome

Steps to reproduce the behavior

Try to introduce a big number and the values will change automatically

Expected behavior

To allow to introduce big int values

albertB4work avatar May 29 '25 09:05 albertB4work

That's greater than Number.MAX_SAFE_INTEGER, so I guess kinda expected?

JuncalLP avatar May 30 '25 05:05 JuncalLP

That's greater than Number.MAX_SAFE_INTEGER, so I guess kinda expected?

Hi, JS supports BigInts, if formatting doesn't work it should be ok for some, but it must not change it to some different invalid value automatically. (in fact this example is also adding format=false)

imaksp avatar May 30 '25 08:05 imaksp

This issue has been automatically marked as stale due to a lack of activity. If this issue is still relevant to you, please leave a comment so we can keep it open. We apologize for not being able to prioritize it sooner. If you have any new information or questions, please share them in your comment!

github-actions[bot] avatar Nov 27 '25 00:11 github-actions[bot]