Date Picker
Provides a date picker with calendar interface.
Examples
Basic Example
The following example demonstrate some of the available functionality for read_date
from abstra.forms import read_date
birthday = read_date("When were you born?")
year = birthday.year
month = birthday.month
day = birthday.day
Parameters
Name | Description | Type |
---|---|---|
label | The label to display to the user | str |
initial_value | The initial value to display to the user. Defaults to None. | Union[datetime.date, time.struct_time, str] |
disabled | whether the input is disabled. Defaults to False. | bool |
required | Whether the input is required or not eg. "this field is required". Defaults to True. | Union[bool, str] |
hint | A tooltip displayed to the user. Defaults to None. | str |
full_width | Whether the input should use full screen width. Defaults to False. | bool |
button_text | What text to display on the button when the widget is not part of a Page. Defaults to 'Next'. | str |
Return Values
Type | Description |
---|---|
datetime.date | The value entered by the user |