primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-InputNumber: scientific annotation (large numbers) bug

Open jserra91 opened this issue 2 years ago • 2 comments

Describe the bug

When you type a lot of numbers in the p-inputnumber, there is a moment when it converts to exponential. All numbers after that number are replaced by 0.

This happens at the component level because of the conversion.

https://primeng.org/inputnumber#numeral

If you type in the field Without Grouping the number 6566546546546216846351346513246641 (random numbers) you will see that there is a moment when the numbers are replaced by 0.

Environment

N/A. Try it in the showcase of primeng

Reproducer

https://primeng.org/inputnumber#numeral

Angular version

15.2.x

PrimeNG version

15.4.5-lts

Build / Runtime

TypeScript

Language

ALL

Node version (for AoT issues node --version)

18.14.2

Browser(s)

Chrome last version

Steps to reproduce the behavior

  1. Go to https://primeng.org/inputnumber#numeral
  2. Write a large number in the Without Grouping
  3. Check the number

Expected behavior

Correct display of the number

jserra91 avatar Jul 20 '23 08:07 jserra91

Also experiencing this issue, has any one found a work around for this?

hcornelisonJHA avatar Jan 04 '24 20:01 hcornelisonJHA

Same issue, didn't found anything yet.

masaintmartin avatar Feb 13 '24 14:02 masaintmartin

This would be resolved by exposing the notation field on InputNumber, like suggested in: https://github.com/primefaces/primeng/issues/11830

fbergmann avatar Feb 22 '24 09:02 fbergmann

This solution won't work for us - we need to display up to 19 digits without using scientific notation (invoice number, account number, etc).

szeiser avatar Mar 12 '24 21:03 szeiser

@szeiser SAME -_-

saver711 avatar May 19 '24 10:05 saver711