Dcc input number, up/down arrows & ".", ","

Hi!

I am trying to use dcc.input with type=“number”
The desired application wld use it for a financial value input.

The up/down arrows are not desired. Couldnt find anything on dash on how to turn em off.

Found this:

but unsure how to apply it to argument “style”.

Also, it would be desired for the input to not take as input the “,” argument.
By default it accepts “,” for decimals. That causes user mistakes, that sometimes use it as a thousand separator.

If possible I would like to auto complete “.” on the display as thousands separators.

Clueless to how to do it. Does dcc.input offer any customatization for that?

Ty,

4 Likes

I was looking to do something similar. Following the link shared in the post above, I added the code to a file named ‘custom.css’ under assets in my dash app and it worked like a charm.

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

Hope it helps someone looking to something similar.

1 Like