shapelets.apps.DataApp.datetime_selector#

DataApp.datetime_selector(title: str = None, date_time: Union[float, int, str, datetime, date, time] = None, min_date: Union[float, int, str, date] = None, max_date: Union[float, int, str, date] = None, **additional) DateSelectorWidget#

Creates a box that allows the user input as date.

Parameters:
titlestr, optional

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

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

Preloaded date.

min_datefloat, int, str or datetime.datetime, optional

Minimum date allowed.

max_datefloat, int, str or datetime.datetime, optional

Maximum date allowed.

Returns:
DateSelectorWidget

Examples

>>> date_selector = app.datetime_selector()
>>> # Datetime selector with int
>>> dt = app.datetime_selector(date_time=1667468964,
>>>                             min_date=1667460964,
>>>                             max_date=1676913679)
>>> # Datetime selector with datetime
>>> dt = app.datetime_selector(date_time=datetime(year=2022, month=1, day=1, hour=18, minute=20))
>>> # Datetime selector with date
>>> dt = app.datetime_selector(date_time=date(year=2022, month=1, day=1),
>>>                             min_date=date(year=1950, month=1, day=1),
>>>                             max_date=date(year=2050, month=1, day=1))
>>> # Datetime selector with strings
>>> dt = app.datetime_selector(date_time='1970-01-01',
>>>                             min_date='1955-01-01',
>>>                             max_date='2100-01-01')

Bind compatibility

You can bind this widget with this:

Bindable as

You can bind this widget as:

  • str