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

DateSlider step parameter is not in ms #7352

Closed
rgr-1 opened this issue Oct 2, 2024 · 1 comment · Fixed by #7353
Closed

DateSlider step parameter is not in ms #7352

rgr-1 opened this issue Oct 2, 2024 · 1 comment · Fixed by #7353

Comments

@rgr-1
Copy link

rgr-1 commented Oct 2, 2024

ALL software version info

panel: 1.5.1 (and 1.5.0)
bokeh: 3.5.2 (and 3.6.0)

Description of expected behavior

https://panel.holoviz.org/reference/widgets/DateSlider.html

  • step (number): The selected step i the slider in milliseconds

Observed:

step is in days. I.e. step=1 adjusts slider in 1 day increment.

In addition:

  • on your page above I can make 1 hour increment by specifying step = 1/(24). Please see attached. This would be absolutely acceptable..
  • however in my project it fails with bokeh (rightfully?) expecting integer for step parameter.
  File "~/miniconda3/envs/my/lib/python3.12/site-packages/bokeh/core/property/bases.py", line 363, in prepare_value
    raise ValueError(f"failed to validate {obj_repr}.{name}: {error}")
ValueError: failed to validate DateSlider(id='9e019eed-0b4d-4faa-bb5e-aee6fca643ba', ...).step: expected a value of type Integral, got 0.041666667 of type float

Screenshots or screencasts of the bug in action

2024-10-02_23-04

@hoxbro
Copy link
Member

hoxbro commented Oct 3, 2024

Bokeh changed it from milliseconds to days at some point. I have opened a PR to clarify this.

It does not look like Bokeh has a DatetimeSlider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants