primevue icon indicating copy to clipboard operation
primevue copied to clipboard

InputNumber can't enter 0.0x using minFractionDigits/mode="currency"

Open Petri-Oosthuizen opened this issue 1 year ago • 1 comments

Describe the bug

When using the PrimeVue InputNumber component on the page https://primevue.org/inputnumber, the component incorrectly interprets decimal values. Specifically, when a user attempts to enter the decimal value "0.04" into any of the example fields that accept decimal values with minFractionDigits or mode="currency" set, the component incorrectly displays the entered value as "0.40". This issue represents a significant problem as it misrepresents the user's intended input, potentially leading to inaccurate data entry and processing.

Reproducer

https://codesandbox.io/p/devbox/upbeat-panini-cmw26s?file=%2Fsrc%2FApp.vue%3A5%2C54-5%2C71

PrimeVue version

3.47.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to the input number page: https://primevue.org/inputnumber/
  2. Click on any of the examples with a decimal
  3. Enter 0.04
  4. Observe that the entered amount is 0.40

Expected behavior

No response

Petri-Oosthuizen avatar Jan 29 '24 12:01 Petri-Oosthuizen

Thanks a lot for your report! I set a milestone for it. We'll check it before the milestone is released.

mertsincan avatar Jan 30 '24 09:01 mertsincan