DateTimePicker
Last updated
Last updated
DateTimePicker
is a widget in Supervisely that allows you to choose a date and time on the UI.
value
Union[int, str, list, tuple, None]
Default value in DateTimePicker
readonly
bool
Allows to set read only mode
disabled
bool
Allows to disable DateTimePicker
editable
bool
Allows to edit input
clearable
bool
Shows clear button
size
Literal["large", "small", "mini", None]
Size of input field
placeholder
str
DateTimePicker
placeholder
w_type
Literal["year", "month", "date", "datetime", "week", "datetimerange", "daterange"]
DateTimePicker
picker type
format
Literal["yyyy", "MM", "dd", "HH", "mm", "ss"]
Datetime displaying format
widget_id
str
ID of the widget
Determine DateTimePicker
default value.
type: Union[int, str, list, tuple, None]
default value: None
Determine DateTimePicker
placeholder.
type: str
default value: "Select date and time"
Determine DateTimePicker
size of the input.
type: Literal["large", "small", "mini", None]
default value: None
Determine DateTimePicker
picker type.
type: Literal["year", "month", "date", "datetime", "week", "datetimerange", "daterange"]
default value: "datetime"
Determine DateTimePicker
displaying format.
type: Literal["yyyy", "MM", "dd", "HH", "mm", "ss"]
default value: "yyyy-MM-dd HH:mm:ss"
Determine whether DateTimePicker
is read-only.
type: bool
default value: False
Determine whether DateTimePicker
is disabled.
type: bool
default value: False
Determine whether the input is editable.
type: bool
default value: False
Determine whether to show a clear button.
type: bool
default value: True
The ID of the widget
type: str
default value: None
get_value()
Return DateTimePicker
current value.
set_value(value: Union[int, str, datetime, list, tuple])
Set DateTimePicker
value.
@value_changed
Decorator function to handle DateTimePicker
click.
You can find this example in our GitHub repository:
supervisely-ecosystem/ui-widgets-demos/input/006_datetime_picker/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
DateTimePicker
and Text
widgetsPrepare a layout for an app using Card
widget with the content
parameter.
Create an app object with a layout parameter.