I have a Bokeh plot which is controlled by a time Bokeh slider. I am trying to set the time of the slider and the corresponding plotted data to the current time of the browser by clicking on a button.
I know how to do the same thing if everything has been entirely developed in JS. But I am writing an external JS function embedded in the HTML file and I don't know how to access the Bokeh objects (in this case the Slider) and manipulate them. I can only use the callback functions to start from a slider and change the underlying data, but not the other way around. I need to set the value of the slider using a button to the current time!
callback = CustomJS( JS Code to cahnge the data; )
Timeslider = DateSlider(start=dt(2019, 9, 1, 16, 0, 0), end=dt(2019, 9, 2, 8, 0, 0), value=dt(2019, 9, 1, 16, 0, 0), step=1)
callback.args['time_slider'] = Timeslider
Timeslider.js_on_change('value', callback)