dcc.Input being a string instead of number

Having a range slider of numeric min/max/value return a string is misleading . DONT DO THAT alis fix it:

try yourself with

the callbacks args:
(None, None, None, None, None, None, None, '19.533189869227', None)

should be int/float. your weird " Important Notice re Integer vs Float" para. underlines the issues. please clean it up

it gets worse if one sets the inital value=1, but later callbacks will be β€˜2’, once it is incremented!

Default is type=β€˜text’ which returns a string. Try including type=β€˜number’

if you were to look closely at the args order abolve the β€˜19.533189869227’ comes from type='range', now what? since min/max/value are already numeric

Right, type=β€œrange” returns a string. It would be better to return numeric.
Now what? Using int() or float() should work.

1 Like