primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.03k stars 4.53k forks source link

p-InputNumber: scientific annotation (large numbers) bug #13353

Open jserra91 opened 1 year ago

jserra91 commented 1 year ago

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

hcornelisonJHA commented 7 months ago

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

masaintmartin commented 6 months ago

Same issue, didn't found anything yet.

fbergmann commented 6 months ago

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

szeiser commented 5 months ago

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

saver711 commented 3 months ago

@szeiser SAME -_-