Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 8, 2022
1 parent 2ab676b commit 89b7546
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
8 changes: 4 additions & 4 deletions examples/reference/widgets/DatetimePicker.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"##### Core\n",
"\n",
"* **``value``** (datetime): The selected value as a datetime type\n",
"* **``start``** (date): Start date of the widget\n",
"* **``end``** (date): End date of the widget\n",
"* **``start``** (date or datetime): Inclusive lower bound of the allowed date selection. Note that while the parameter accepts datetimes the time portion of the range is ignored.\n",
"* **``end``** (date or datetime): Inclusive upper bound of the allowed date selection. Note that while the parameter accepts datetimes the time portion of the range is ignored.\n",
"* **``disabled_dates``** (list): Dates to make unavailable for selection; others will be available\n",
"* **``enabled_dates``** (list): Dates to make available for selection; others will be unavailable\n",
"* **``enable_time:``** (boolean): Enable change of the time in the widget, default is True\n",
"* **``enable_seconds:``** (boolean): Enable change of the seconds in the widget, default is True\n",
"* **``enable_time:``** (boolean): Enable editing of the time in the widget, default is True\n",
"* **``enable_seconds:``**g (boolean): Enable editing of seconds in the widget, default is True\n",
"* **``military_time:``** (boolean): Enable 24 hours time in the widget, default is True\n",
"\n",
"\n",
Expand Down
10 changes: 5 additions & 5 deletions examples/reference/widgets/DatetimeRangePicker.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
"##### Core\n",
"\n",
"* **``value``** (tuple): Tuple of upper and lower bounds of the selected range expressed as datetime types\n",
"* **``start``** (date): Start date of the widget\n",
"* **``end``** (date): End date of the widget\n",
"* **``start``** (date or datetime): Inclusive lower bound of the allowed date selection. Note that while the parameter accepts datetimes the time portion of the range is ignored.\n",
"* **``end``** (date or datetime): Inclusive upper bound of the allowed date selection. Note that while the parameter accepts datetimes the time portion of the range is ignored.\n",
"* **``disabled_dates``** (list): Dates to make unavailable for selection; others will be available\n",
"* **``enabled_dates``** (list): Dates to make available for selection; others will be unavailable\n",
"* **``enable_time:``** (boolean): Enable change of the time in the widget, default is True\n",
"* **``enable_seconds:``** (boolean): Enable change of the seconds in the widget, default is True\n",
"* **``military_time:``** (boolean): Enable 24 hours time in the widget, default is True\n",
"* **``enable_time:``** (boolean): Enable editing of the time in the widget, default is True\n",
"* **``enable_seconds:``** (boolean): Enable editing of seconds in the widget, default is True\n",
"* **``military_time:``** (boolean): Whether to display time in 24 hour format, default is True\n",
"\n",
"\n",
"##### Display\n",
Expand Down
25 changes: 18 additions & 7 deletions panel/widgets/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,30 @@ def _process_property_change(self, msg):

class _DatetimePickerBase(Widget):

start = param.Date(default=None)
disabled_dates = param.List(default=None, class_=(date, str), doc="""
Dates to make unavailable for selection.""")

end = param.Date(default=None)
enabled_dates = param.List(default=None, class_=(date, str), doc="""
Dates to make available for selection.""")

disabled_dates = param.List(default=None, class_=(date, str))
enable_time = param.Boolean(default=True, doc="""
Enable editing of the time in the widget.""")

enabled_dates = param.List(default=None, class_=(date, str))
enable_seconds = param.Boolean(default=True, doc="""
Enable editing of the seconds in the widget.""")

enable_time = param.Boolean(default=True)
end = param.Date(default=None, doc="""
Inclusive upper bound of the allowed date selection. Note that while
the parameter accepts datetimes the time portion of the range
is ignored.""")

enable_seconds = param.Boolean(default=True)
military_time = param.Boolean(default=True, doc="""
Whether to display time in 24 hour format.""")

military_time = param.Boolean(default=True)
start = param.Date(default=None, doc="""
Inclusive lower bound of the allowed date selection. Note that while
the parameter accepts datetimes the time portion of the range
is ignored.""")

_source_transforms = {'value': None, 'start': None, 'end': None, 'mode': None}

Expand Down

0 comments on commit 89b7546

Please sign in to comment.