shapelets.apps.DataApp.datetime_range_selector#

DataApp.datetime_range_selector(title: str = None, start_datetime: Union[float, int, str, datetime, date, time] = None, end_datetime: Union[float, int, str, datetime, date, time] = None, min_datetime: Union[float, int, str, datetime, date, time] = None, max_datetime: Union[float, int, str, datetime, date, time] = None, **additional) DatetimeRangeSelectorWidget#

Creates a box that allows the user input as date range.

Parameters:
titlestr, optional

String with the widget title. It will be placed on top of the widget box.

start_datetimefloat, int, str, datetime.datetime, datetime.date or datetime.time, optional

Preloaded start range date.

end_datetimefloat, int, str, datetime.datetime, datetime.date or datetime.time, optional

Preloaded end range date.

min_datetimefloat, int, str, datetime.datetime, datetime.date or datetime.time, optional

Minimum date allowed.

max_datetimefloat, int, str, datetime.datetime, datetime.date or datetime.time, optional

Maximum date allowed.

Returns:
DatetimeRangeSelectorWidget

Examples

>>> date_selector = app.datetime_range_selector()
>>> # Datetime range selector with int
>>> dt = app.datetime_range_selector(start_datetime=1667468964,
>>>                                 end_datetime=1667468964,
>>>                                 min_datetime=1667468964,
>>>                                 max_datetime=1667468964)
>>> # Datetime range selector with date
>>> dt = app.datetime_range_selector(start_datetime=date(year=2022, month=11, day=1),
>>>                                 end_datetime=date(year=2022, month=11, day=10),
>>>                                 min_datetime=date(year=1950, month=1, day=1),
>>>                                 max_datetime=date(year=2050, month=1, day=1))
>>> # Datetime range selector with datetime
>>> dt = app.datetime_range_selector(start_datetime=datetime(year=2022, month=11, day=1, hour=21),
>>>                                 end_datetime=datetime(year=2022, month=11, day=10, hour=19, second=5),
>>>                                 min_datetime=date(year=1950, month=1, day=1),
>>>                                 max_datetime=date(year=2050, month=1, day=1))
>>> # Datetime range selector with string
>>> dt = app.datetime_range_selector(start_datetime='2022-01-01 00:05:00',
>>>                                 end_datetime='2022-12-31 23:59:59',
>>>                                 min_datetime='1955-01-01',
>>>                                 max_datetime='2100-01-01')

Bind compatibility

You can bind this widget with this:

Bindable as

You can bind this widget as:

  • tuple