Black Lives Matter. Please consider donating to Black Girls Code today.

Numeric input separators

Hey there,

for my current dash project I have several numeric inputs with big numbers. Those numbers are quite hard to read without separators. The dash-table component has a formatting function for the cells. Is there a similar function for inputs? If not what are other possibilities to achieve that behavior, like typing 1000000 but having 1.000.000 or 1 000 000 displayed in the input?

Kind regards,
Nico

Hi @Niconius I don’t think this is possible in an input, but you can have a div close to the input where you display the formatted number (using for example f-strings, f"{1000000:,d}" or f"{num:,d}" where num is your variable). See the first example of https://dash.plot.ly/dash-core-components/input to see how to update a div when an input is changed.