primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Spinner: decimals are separated by the thousand separator

Open davidescr opened this issue 9 years ago • 5 comments

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] support request

Plunkr Case (Bug Reports) http://plnkr.co/edit/HZxGrxWg7U6Jmq6qKjRc?p=preview

Current behavior Decimals are formatted with thousand separator, if the starting value has 4 or more decimals. Example: 12041.2456 is formatted to 12,041.2,456

Expected behavior No thousand separator on decimals. Example: 12041.2456 -> 12,041.2456

Minimal reproduction of the problem with instructions Declare a variable with 4 or more decimals and bind that variable with the [(ngModel)] directive. The formatted value shows the thousand separator even in decimals.

Please tell us about your environment: Xubuntu 16.04, Visual Studio Code

  • Angular version: 4.0.0

  • PrimeNG version: 4.0.3

  • Browser: Chrome 58.0.3029.81

  • Language: TypeScript 2.3.0

  • Node (for AoT issues): node --version = v6.10.2

davidescr avatar Jun 05 '17 14:06 davidescr

Are there any plans to fix this issue in the near future? The spinner is not really usable for more than 3 decimals this way.

kheckelmann avatar Aug 08 '17 07:08 kheckelmann

Related to this bug, it seems that options "thousandSeparator" and "decimalSeparator" are inefficient.

sylvainpey avatar Aug 09 '17 10:08 sylvainpey

I put together a little change which only formats up to the decimalSeparator.

BearInHat avatar Aug 10 '17 16:08 BearInHat

Actually the spinner can be used only for small integer, too many bugs for other usages. Focus issue when the thousand separator is automatically added + thousand separator for the decimal values + clicking for step increase/decrease discard the decimal value... This component is not mature enough...

JordanDurieux avatar Jan 18 '18 09:01 JordanDurieux

PR merged

cagataycivici avatar Mar 28 '18 10:03 cagataycivici