primeng icon indicating copy to clipboard operation
primeng copied to clipboard

InputNumber: cannot insert fractional digits when minFractionDigits=0

Open Timmeeeey opened this issue 6 years ago • 24 comments

I'm submitting a ...

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

Plunkr Case (Bug Reports) https://stackblitz.com/edit/github-cshg3y

Current behavior If minFractionDigits = 0 and maxFractionDigits > 0 you cannot insert any fractional digits.

Minimal reproduction of the problem with instructions <p-inputNumber mode="decimal" [minFractionDigits]="0" [maxFractionDigits]="5"></p-inputNumber>

  • Angular version: 10

  • PrimeNG version: 10.0.2

Timmeeeey avatar Sep 11 '20 15:09 Timmeeeey

I also encountered this issue.

pete4dev avatar Sep 14 '20 14:09 pete4dev

got any solution for this?

anujtrehan avatar Sep 21 '20 04:09 anujtrehan

this issue also exists in primeng 9.x

FabienDehopre avatar Nov 04 '20 12:11 FabienDehopre

it the issue fixed in primeng 10.x ??

anujtrehan avatar Nov 04 '20 17:11 anujtrehan

I cloned their stackblitz from the official documentation page: https://stackblitz.com/edit/primeng-inputnumber-demo-4apujo?file=src/app/app.component.html There is one example with the minFractionDigits set to 0 and one bigger than 0. So, you can see that the first one does not allow entering decimal digits by hand or by pasting (it works when bound to a value with decimals). The second one (with minFractionDigits set to 2) allows entering decimal value by hand but has really strange behavior when pasting (if you copy/paste a value in the second input, the value becomes 100 when clicking outside the input or pressing enter).

FabienDehopre avatar Nov 04 '20 19:11 FabienDehopre

I am experiencing this as well. <p-inputNumber mode="decimal" [minFractionDigits]="0" [maxFractionDigits]="5"> does not allow me to input any decimal points, but this: <p-inputNumber mode="decimal" [minFractionDigits]="1" [maxFractionDigits]="5"> does. The downside here is that it always displays '.0' on my numbers if no other decimal is put in.

I am experiencing this on v10.0.3

evandouglas avatar Nov 16 '20 19:11 evandouglas

Hello @yigitfindikli,

We'd be appreciated if the possible fix is applied to the primeng 9.1.3 as well?

serdarceran avatar Dec 08 '20 11:12 serdarceran

Hello @yigitfindikli,

We'd be appreciated if the possible fix is applied to the primeng 9.1.3 as well?

Indeed, it would be really nice

FabienDehopre avatar Dec 08 '20 12:12 FabienDehopre

Any updates? This feature is very important to be able to allow the user to not enter any fractions or enter them if necessary.

Thanks.

Sun3 avatar Jan 17 '21 04:01 Sun3

I have the same problem! Would be nice if this gets fixed.

jvdyck avatar Feb 01 '21 14:02 jvdyck

Same problem, any acknowledgement? The behavior I'm seeking is to support decimals, but not necessarily append one until the user has actually input a decimal.

This is communicated to the user via a placeholder I've set of 0.00, without actually enforcing a decimal on all inputs

jmynes avatar Feb 25 '21 00:02 jmynes

Any news? From our perspective, the error is very critical. For us, PrimeNG is useless if it doesn't work.

OPunktSchmidt avatar Mar 12 '21 10:03 OPunktSchmidt

Same issue here

ThorstenKunz avatar Mar 30 '21 14:03 ThorstenKunz

This issue is also present in 11.3.1.

saul-lopez avatar Apr 05 '21 18:04 saul-lopez

Seriously? This is still opened? Bug is still in 11.3.2

danbord avatar Apr 21 '21 14:04 danbord

Seriously? This is still opened? Bug is still in 11.3.2

Yeah and it is closed and ignored in other prime projects as well

Anubarak avatar Apr 21 '21 15:04 Anubarak

Sorry for the delayed response! Fixed now ;)

Best Regards,

mertsincan avatar Sep 06 '21 11:09 mertsincan

This does not appear to be fixed in primeng 11.4.5 Could we get the same fix applied for angular so that the number inputs work like normal allowing me to type a decimal in myself?

nascarjake avatar Sep 30 '21 03:09 nascarjake

Issue still exists in 11.4.9 LTS

gschafra avatar Dec 07 '21 13:12 gschafra

No solution for this after 2 years? Why is this closed anyway? It's a regular bug.

brano-p avatar May 31 '22 10:05 brano-p