primefaces / primeng

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

InputNumber: Decimal separator does not work correctly if suffix is used #16496

Open mscharrig opened 2 weeks ago

mscharrig commented 2 weeks ago

Describe the bug

If I use an InputNumber with a suffix and the locale is set to “de-DE”, it is not possible to enter the decimal separator (in this case a comma). If I omit the suffix or set the minFractionDigits to a value >= 1, it is possible to enter the decimal separator.

The attached stackblitz contains 3 examples

Environment

.

Reproducer

https://stackblitz.com/edit/mwugmq?file=src%2Fapp%2Finput-number-prefix-suffix-demo.html

Angular version

18.2.7

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.4

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

It should be possible to type decimal numbers when using a separator without having to specify a minFractionDigits value

daniel-rck commented 4 days ago

I can confirm this issue. Will work with [minFractionDigits]="1" until it's fixed