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

Set step in DatetimeRangeSlider to 1 minute #6373

Merged
merged 4 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/reference/widgets/DatetimeRangeSlider.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"\n",
"* **``start``** (datetime): The range's lower bound\n",
"* **``end``** (datetime): The range's upper bound\n",
"* **``step``** (int): Step in milliseconds\n",
"* **``step``** (int): Step in milliseconds, default is 1 minute (60.000 ms)\n",
"* **``value``** (tuple): Tuple of upper and lower bounds of the selected range expressed as datetime types\n",
"* **``value_throttled``** (tuple): Tuple of upper and lower bounds of the selected range expressed as datetime types throttled until mouseup\n",
"\n",
Expand Down
3 changes: 3 additions & 0 deletions panel/widgets/slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,9 @@ class DatetimeRangeSlider(DateRangeSlider):
... )
"""

step = param.Number(default=60_000, doc="""
The step size in ms. Default is 1 min.""")

_property_conversion = staticmethod(value_as_datetime)

@property
Expand Down
Loading