Component should be able to accept multiple decimal separator inputs
See original GitHub issueFirst, I’d like to say that this component saved me sooo much time! I very thankful for your work!
A short description of my problem, and maybe some other people’s:
I have a field which is configured to use ‘,’ (comma) as a decimal separator. When set the component to work this way by doing <NumberFormat decimalSeparator={','} .... />
, it all works as expected, except it doesn’t accept entering a dot instead.
What I think it should do is it’d accept both a “.” and any custom decimal separator and convert to the custom one. Example in my case:
If I enter 4,0 it shoud show 4,0 and if I enter 4.0 it should show the same - 4,0. Right now, when I enter 4.0 it just becomes 40.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to handle floats and decimal separators with html5 input ...
I think what's missing in the answers above is the need to specify a different value for the step attribute, which has a...
Read more >Using both '.' and ',' as decimal separators in a NumericTextBox
I am using a NumericTextBox in a form to input a decimal number. The only decimal-separating character is " , ". I would...
Read more >NumericTextField Decimal format - Ignition
When i use numerictextfield component with a float value, it show value ... [BUG] Decimal separator in numeric input field behaves wrong for ......
Read more >Solved: Good practice: managing local decimal separator
Solved: Hi there, I'm maintaining a software that is delivered in different countries and I have two computers set with different regions to ......
Read more >How we internationalized our number field
A number field allows users to input and edit numeric values. ... For example, decimals can be rounded to a particular number of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s complicated to find the difference between a decimal separator and thousand separator when ‘.’ is used as thousand separator and allowing ‘.’ to be considered as decimal separator while typing. Also as onKeyDown is not reliable will not support this. This is how most of the formatting modules behave so we will continue the existing behaviour.
It’s a huge difference between “.” And “,” I’m not agree with this conclusion. I have two options make a pull request with some profound changes or I leave this repository…
In Europe we have different way to represent currency formats, this is obviously described on intl iso paper.