-
Notifications
You must be signed in to change notification settings - Fork 449
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. |
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: