date_range class
A control that can display and specify a range of dates or times.
Methods¶
__init__() ¶
__init__(
dates=None,
with_time=False,
format=None,
editable=True,
label_start=None,
label_end=None,
width=None,
on_change=None,
propagate=None, # App config
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new date_range
element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
list[datetime]
|
The dates that this control represents and can modify. |
None
|
|
bool
|
Whether or not to show the time part of the date. |
False
|
|
str
|
The format to apply to the value. See below. |
None
|
|
bool
|
Shows the date as a formatted string if not editable. |
True
|
|
str
|
The label associated with the first input. |
None
|
|
str
|
The label associated with the second input. |
None
|
|
Union[str, int]
|
The width of the date_range element. |
None
|
|
Union[str, Callable]
|
A function or the name of a function that is triggered when the value changes.
|
None
|
|
bool
|
Determines whether the control's value is automatically reflected in the bound application variable. |
App config
|
|
bool
|
Indicates if this element is active. |
True
|
|
str
|
The identifier assigned to the rendered HTML component. |
None
|
|
dict[str, Any]
|
A dictionary of additional properties that can be set to the element. |
None
|
|
str
|
A space-separated list of CSS class names to be applied to the generated HTML element. |
None
|
|
str
|
The text that is displayed when the user hovers over the element. |
None
|