On Jul 18, 2017, at 09:29, John <[email protected]> wrote:
Hi,
here it is
from bokeh.layouts import widgetbox
from bokeh.models import widgets
from bokeh.plotting import curdoc
def change_time():
print 'previous values: ', time.value, time.min_date, time.max_date
time.value = '2015-11-10'
time.min_date = '2015-10-01'
time.max_date = '2015-12-30'
print 'changed values: ', time.value, time.min_date, time.max_date
return 0
time = widgets.inputs.DatePicker(title="Intervention", value='2015-11-02', min_date='2015-11-01', max_date='2015-12-01')
button = widgets.Button(label="Change time", button_type="success")
button.on_click(change_time)
layout = widgetbox([time,button])
curdoc().add_root(layout)
by clicking the button the time in widget must change, it does not.
Best,
вторник, 18 июля 2017 г., 16:03:46 UTC+2 пользователь Bryan Van de ven написал:
Hi,
Can you please provide a complete script that can be run and tested?
Thanks,
Bryan
> On Jul 18, 2017, at 08:29, John <[email protected]> wrote:
>
> I want to update the value of DatePicker widget.
>
> time = widgets.inputs.DatePicker(title="Time", value='2015-11-01')
> # print time.value gives '2015-11-01'
>
> time.value = '2014-11-01'
> # print time.value gives '2014-11-01'
>
>
>
> but on webpage the value doesn't update. The same problem arises when you change min_date, max_date. The value in object changes, the value on screen doesn't.
> I use bokeh-0.12.7.dev11
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8b66f1f5-5761-47ae-93c2-388c84123362%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4ef5f460-80ee-4395-9abd-2f8b8b160245%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.