当我在 SO 上尝试使用 DateRangeSlider 解决另一个问题时,我发现 slider 上的开始日期 01/01/2017 已更改为 01/01/2016。当我将日期滑动到 1 月 2 日时,它正确显示了年份。这似乎是一个错误。如果没有,我该如何解决?
下面是我使用的代码:
from datetime import date
from bokeh.models.widgets import DateRangeSlider
from bokeh.layouts import layout
from bokeh.io import curdoc
date_range_slider = DateRangeSlider(title="Date Range: ", start=date(2017, 1, 1), end=date.today(), value=(date(2017, 9, 7), date(2017, 10, 15)), step=1)
l = layout(children=[[date_range_slider]], sizing_mode='fixed')
curdoc().add_root(l)
curdoc().title = "DateRangeSlider Example"
最佳答案
关于python - Bokeh: DateRangeSlider decreases the year by 1 when the chosen start date is Jan 1st,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46786505/