8000 [BUG] DatePicker display off-by-one in non-GMT timezone after upgrade to 1.4.0 · Issue #9494 · bokeh/bokeh · GitHub
[go: up one dir, main page]

Skip to content

[BUG] DatePicker display off-by-one in non-GMT timezone after upgrade to 1.4.0 #9494

@rstrutt

Description

@rstrutt

Versions:

  • Bokeh: 1.4.0
  • Python: 3.7.3
  • Chrome: 78.0.3904.108 (Official Build) (64-bit)
  • O/S: Windows 7 Pro SP1
  • TimeZone: EST (Issue observed in EST but not in GMT)

After the fix of this issue in 1.4, I observe the following issue;

In the EST timezone, if I up 71A0 date a DatePicker based on the value of another DatePicker, I get a different date (1 day previous to the selected date). If the browser is located in a GMT timezone then I do not observe the issue. Minimal example below.

Expected behavior: On selecting a date from the first DatePicker, the second DatePicker displays that same date;

image

Observed behavior: On selecting a date from the first DatePicker, the second DatePicker shows a date one day previous to the selected date;

image

from bokeh.layouts import column
from bokeh.models import DatePicker
from bokeh.plotting import curdoc


def a_changed(attr, old, new):
    date_picker_b.value = new


date_picker_a = DatePicker()
date_picker_b = DatePicker()

# When we pick a date in date_picker_a, set the date in date_picker_b
date_picker_a.on_change('value', a_changed)

curdoc().add_root(column(date_picker_a, date_picker_b))

In our application, we have a date slider and some fixed date-range buttons (year-to-date, month-to-date etc) coupled to two date pickers, which is how we observed the issue, but the above example seems to minimally demonstrate the issue that dates don't round-trip from the DatePickers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0