We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the solution you'd like Allow currency format for dcc.Input while keeping the value type as number and the arrows to increase/decrease it.
Describe alternatives you've considered Clientside circular callback that updates the value format based on this JS solution:
import dash from dash import Input, Output, State, callback, dcc, html, ctx app = dash.Dash(__name__) app.layout = html.Div([ dcc.Input(id='input-number', value=522.31, type='number') ]) app.clientside_callback( """ function(value) { return value.toLocaleString('us-US', { style: 'currency', currency: 'USD' }); } """, Output('input-number', 'value'), Input('input-number', 'value') ) if __name__ == '__main__': app.run_server(debug=True)
It raises this error in the JS Console:
react-dom@16.v2_7_0m1667919873.14.0.js:1857 The specified value "-US$1.00" cannot be parsed, or is out of range.
If type='number' is not specified, the value is accepted but the arrows to increase/decrease the value disappear.
type='number'
Other option is a one-cell table with html.Buttons and a callback to increase/decrease the value (it's very complex for just a simple input)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the solution you'd like
Allow currency format for dcc.Input while keeping the value type as number and the arrows to increase/decrease it.
Describe alternatives you've considered
Clientside circular callback that updates the value format based on this JS solution:
It raises this error in the JS Console:
If
type='number'
is not specified, the value is accepted but the arrows to increase/decrease the value disappear.Other option is a one-cell table with html.Buttons and a callback to increase/decrease the value (it's very complex for just a simple input)
The text was updated successfully, but these errors were encountered: