Skip to content

Commit

Permalink
Fix param mapping for param.CalendarDate and DatePicker (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 20, 2020
1 parent 46b1c80 commit 52a8287
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions panel/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
)
from .viewable import Layoutable
from .widgets import (
Button, Checkbox, ColorPicker, DataFrame, DatetimeInput, DateRangeSlider,
FileSelector, FloatSlider, IntSlider, LiteralInput, MultiSelect,
RangeSlider, Select, Spinner, StaticText, TextInput, Toggle, Widget
Button, Checkbox, ColorPicker, DataFrame, DatePicker, DatetimeInput,
DateRangeSlider, FileSelector, FloatSlider, IntSlider, LiteralInput,
MultiSelect, RangeSlider, Select, Spinner, StaticText, TextInput,
Toggle, Widget
)
from .widgets.button import _ButtonBase

Expand Down Expand Up @@ -121,6 +122,7 @@ class Param(PaneBase):
_mapping = {
param.Action: Button,
param.Boolean: Checkbox,
param.CalendarDate: DatePicker,
param.Color: ColorPicker,
param.Date: DatetimeInput,
param.DateRange: DateRangeSlider,
Expand Down
6 changes: 3 additions & 3 deletions panel/widgets/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ def _process_param_change(self, msg):

class DatePicker(Widget):

value = param.Date(default=None)
value = param.CalendarDate(default=None)

start = param.Date(default=None)
start = param.CalendarDate(default=None)

end = param.Date(default=None)
end = param.CalendarDate(default=None)

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

Expand Down

0 comments on commit 52a8287

Please sign in to comment.