Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateRangeSlider step not working #5498

Closed
itsgifnotjiff opened this issue Sep 9, 2023 · 3 comments · Fixed by #5510
Closed

DateRangeSlider step not working #5498

itsgifnotjiff opened this issue Sep 9, 2023 · 3 comments · Fixed by #5510
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@itsgifnotjiff
Copy link

ALL software version info

bokeh : 3.2.1
panel : 1.2.1
jupyterlab : 4.0.5

Description of expected behavior and the observed behavior

The DateRangeSlider widget is broken. The documentation page shows how to use it but when I tried to replicate it the widget only has the start and end steps instead of creating the steps between them.

Complete, minimal, self-contained example code that reproduces the issue

from datetime import datetime as dt
from panel.widgets import DateRangeSlider
import panel as pn

pn.extension()

date_range_slider = pn.widgets.DateRangeSlider(
    name='Date Range Slider',
    start=dt(2017, 1, 1), end=dt(2019, 1, 1),
    value=(dt(2017, 1, 1), dt(2018, 1, 10)),
    step=24*3600*2*1000
)

date_range_slider
@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Sep 11, 2023
@philippjfr philippjfr added this to the v1.2.3 milestone Sep 11, 2023
@hoxbro
Copy link
Member

hoxbro commented Sep 12, 2023

Bokeh has changed the step from milliseconds to days. So setting step=2 should work for you.

Some updates to the docs and docstring would be very appreciated.

@itsgifnotjiff
Copy link
Author

So do I now 1/8 to get a 3 hour steps?

@hoxbro
Copy link
Member

hoxbro commented Sep 12, 2023

You use DatetimeRangeSlider, which still uses milliseconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants