Numeric input widget, not slider

Is there a way to have a numeric input widget (not a slider), similar to ipywidgets bounded float?

I want to use the input value of g = 9.81412543 in a bounded input widget.

I tried the Spinner widget but this doesn’t work well with decimal points.

What version of Bokeh are you using? There were changes to decimal-point handling for Bokeh spinners in that I think are included in bokeh 1.4 but not earlier versions.

I am using bokeh 1.4 with panel 0.8 in a python 3.8.1 environment on macOS.

import panel as pn
g = pn.widgets.Spinner(name="g", value=9.81)

def show_widget_value(g):
return g

example = pn.Column(g, show_widget_value)

If i change the value in the spinner widget and hit enter it is changed (rounds up) to an even 10. Even if the initial value was already a float number.

If i then add a step=0.01 to the widget it works for the given step. But i want, for example, calculate one time with tow digits after the decimal point and another time with 13 ore more digits.

The spinner is nice, but doesn’t seem suitable to enter any numerical value with an undefined number of digits.

Seems like this is a bug and will be fixed soon

@philippjfr I’m not sure the mention bug (concerning the step accuracy) will fix the problem. When I type in a decimal number into the spinner widget, for example 9,812 and hit enter, the widget is showing an even 10.