TimeInput¶
A widget to select a clock time.

Not supported




Not supported
Usage¶
import toga
current_time = toga.TimeInput()
Notes¶
- This widget supports hours, minutes and seconds. Microseconds will always be returned as zero.
- On Android and iOS, seconds will also be returned as zero, and any second component of a minimum or maximum value will be ignored.
- Properties that return
datetime.timeobjects can also accept: datetime.datetime: The time portion will be extracted.str: Will be parsed as an ISO8601 format time string (e.g., "06:12").
Reference¶
toga.TimeInput ¶
TimeInput(
id=None,
style=None,
value=None,
min=None,
max=None,
on_change=None,
**kwargs,
)
Bases: Widget
Create a new TimeInput widget.
| PARAMETER | DESCRIPTION |
|---|---|
id
|
The ID for the widget.
TYPE:
|
style
|
A style object. If no style is provided, a default style will be applied to the widget.
TYPE:
|
value
|
The initial time to display. If not specified, the current time will be used.
TYPE:
|
min
|
The earliest time (inclusive) that can be selected.
TYPE:
|
max
|
The latest time (inclusive) that can be selected.
TYPE:
|
on_change
|
A handler that will be invoked when the value changes.
TYPE:
|
kwargs
|
Initial style properties.
DEFAULT:
|