Skip to content

Commit

Permalink
Set step in DatetimeRangeSlider to 1 minute (#6373)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Feb 23, 2024
1 parent 1c8d429 commit 8c8d1ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 8c8d1ec

Please sign in to comment.