Inputnumber, decimal numbers
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://www.primefaces.org/primeng/showcase/#/inputnumber
Current behavior With Locale DE it is impossible to enter the fractional part of a number easily. (You have to switch the cursor position behind the comma and then can change digits there).
Expected behavior I would expext by typing something like 1,23 to get a value of 1,23 and not of 123. It also did not work with a ".". This might even be locale independent?!
Minimal reproduction of the problem with instructions Try entering a fractional number on the Showcase side.
What is the motivation / use case for changing the behavior? User want to enter form data quickly and without much fuzz. Need to use cursor position or mouse input to enter a simple number kills UX.
Please tell us about your environment: Not applicable as it is already evident in Showcase.
-
Angular version: 5.X Showcase.
-
PrimeNG version: 5.X 9.1.0
-
Browser: Tested: Chrome & Firefox
+1
+1 Experiencing the same issue with mode="decimal" locale="en-US" AND with mode="currency" currency="USD" Edit: Its also an issue for every inputNumber on the documentation page
Same here with mode decimal and locale="pt-BR". Also with currency mode and currency="BRL". v9.1.0 and angular 9.1.8
Hey, @cagataycivici. I was using PrimeNG v9.1.0 and was facing the same issues. After upgrading to v9.1.3, this issue went away.
By the way, another issue I was having is that, on a reactive form, InputNumber fields were not respecting the disabled attribute when set through the FormGroup (setting it directly on the HTML element did work, but I got warnings). This is another issue that was solved by upgrading.
Not sure this feedback is enough, but I wanted to say thank you.
//cc @MarkusKuepper
@brunokrebs Just updated to v9.1.3 and the issue is not any different for me.
Considering its marked for 10.0.0-rc4 and is not marked as pending-review I don't think there's been any work completed on it. Its been rather annoyingly slow going especially since its been considered an "enhancement" rather than a defect as if input-number was usable in the current state. Thankfully both projects I'm working on that I would love to use input-number for aren't ready for prime time yet. I doubt we'll see a fix before v10.0.0.
Thanks a lot for all feedbacks! Could you please test these issues on PrimeReact inputNumber? https://primefaces.org/primereact/showcase/#/inputnumber if it works fine for you, I can add new improvements to PrimeNg. This component is open to user experiences. Therefore, feedback is important to us.
Thanks again! Best Regards,
Well, that's interesting. I see a lot of improvements on 9.1.3. I had all kind of issues on 9.1.0 but they are mostly gone now (and I updated to 9.1.3 just because of these issues). The following issues are the one I was facing:
- Typing values with decimal was buggy and hard to accomplish properly (current situation is not perfect but a lot better).
- Disabling on reactive forms was not working (fixed)
- The value extracted from the input was out of sync with the value being presented (fixed)
I'm using pt-BR and, right now, I'm happy with it. But I will do some more investigation.
@mertsincan Hi,
there are still some issues with inputNumber.
- pasting a number with fractional digits does't work. If you paste 123,45 you get 12.345,00.
- when you select an existing number with fractional digits and try to replace it by typing 123 you get 1,0023.
Thanks a lot for the feedbacks, @brunokrebs and @Timmeeeey !
@Timmeeeey
pasting a number with fractional digits does't work. If you paste 123,45 you get 12.345,00.
Could you please create a new ticket for this issue on PrimeNg Github?
Other problems are solved. Fixed in https://github.com/primefaces/primeng/commit/1258ca4d4b7a15575fa950fc83af980f2107d3d5
Best Regards,
@mertsincan I created a new issue #9219 for the pasting problem.