I recently updated to Bokeh 2.0 and ran into a problem with the new DatePicker, which previously worked for me. Here is some example code:
from bokeh.plotting import curdoc
from bokeh.layouts import column
from bokeh.models.widgets import Button, DatePicker
from datetime import date
dp = DatePicker(title='Date')
dp.value = date(2020, 1, 3)
print(dp, dp.value)
bt = Button(label='button')
def update_dp():
print(dp, dp.value)
dp.value = date(2020, 2, 2)
bt.on_click(update_dp)
curdoc().add_root(column(dp,bt))
In this example the first assignment to dp.value sets the date correctly but subsequent calls to update_dp() do not update the UI even though dp.value is changed.
Am I doing something wrong?
Thanks for any help.
Kevin