-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue]: How to format number in NumberInput #922
Comments
This looks interesting. |
Would be awesome if we receive as optional props an "formatter" which represents Intl.NumberFormat constructor So we separate the render value from the reference value return (
<NumberInput
defaultValue={123456.79}
formatter={ new Intl.NumberFormat('en-US', { style: 'currency', currency: "USD" }) }
/>
)
DISPLAY VALUE: '$123,456.79'
REF VALUE: 123456.79 I am available to work on this if needed. |
Hi! @hikinine, this feature would be awesome! I assigned you to this, let me know if you need any help! |
Wonderful, i'll keep you posted |
Hi! @hikinine I would love to have this feature, do you have any updates? Need an extra pair of hands to work on this? |
Hey, would be good. Implemented some work around which is not the best UX solution, but works. Lets move the discussion to https://github.com/tremorlabs/tremor/pull/1111 |
Tremor Version
latest
Link to minimal reproduction
.
Steps to reproduce
I have a NumberInput and I want the German number format. In German, they use comma , instead of . fr their float numbers.
Code
What is expected?
.
What is actually happening?
.
What browsers are you seeing the problem on?
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: