Various time management related widgets for the Textual framework.
Documentation | Changelog | PyPi
Included Widgets
Pickers | Description |
---|---|
DatePicker | A visual date picker with an input and overlay. |
DurationPicker | Visual duration picker with duration up to 99 hours. |
TimePicker | Visual time picker for setting a time in a 24 hour clock. |
DateTimePicker | Datetime picker that combines a date and time. |
DateRangePicker | Date range picker for picking an interval between two dates. |
DateTimeRangePicker | Range picker for picking an interval between two times. |
DateTimeDurationPicker | Pick an interval between two times, including a duration input. |
Activity Heatmap | Description |
---|---|
ActivityHeatmap | Activity Heatmap for displaying yearly data similar to the GitHub contribution graph. |
HeatmapManager | Widget for browsing the Activity Heatmap with yearly navigation builtin. |
Selector | Description |
---|---|
DateSelect | Date selection widget with calendar panes. |
TimeSelect | Time selection widget with various times in 30 minute intervals. |
DurationSelect | Duration selection widget with modifiers for adjust time or duration. |
Input | Description |
---|---|
DateInput | Date input which takes in a iso-format date. |
TimeInput | Time input that takes in 24 hour clocked in a HH:MM:SS format. |
DurationInput | Duration input with a duration up to 99 hours. |
DateTimeInput | An input with a combination of a date and time in iso-format. |
uvx --from textual-timepiece demo
pipx run textual-timepiece
pip install textual-timepiece
uv add textual-timepiece
poetry add textual-timepiece
Note
Requires whenever as an additional dependency.
from textual.app import App, ComposeResult
from textual_timepiece.pickers import DatePicker
from whenever import Date
class DatePickerApp(App[None]):
def compose(self) -> ComposeResult:
yield DatePicker(Date(2025, 3, 4))
if __name__ == "__main__":
DatePickerApp().run()
from textual.app import App, ComposeResult
from textual_timepiece.pickers import DateTimePicker
from whenever import SystemDateTime
class DateTimePickerApp(App[None]):
def compose(self) -> ComposeResult:
yield DateTimePicker(SystemDateTime(2025, 3, 4, 9, 42, 47)))
if __name__ == "__main__":
DateTimePickerApp().run()
- More examples can be found here.
MIT. Check LICENSE for more information.