Skip to main content

A calendar date/time picker widget for Textual UI.

Project description

textual-calendar

A calendar date/time picker widget for Textual UI.

DatetimePicker Widget Demo

Features

  • Calendar Widget - Interactive monthly calendar date selection
  • Time Widget - Time picker with hour, minute, and second selection
  • Timezone Support - Optional timezone selection with auto-complete
  • DatetimePicker - Combined date and time picker
  • Keyboard Navigation - Full keyboard support with arrow keys, Page Up/Down
  • Mouse Support - Click to select dates

Installation

pip install textual-calendar

Quick Start

Calendar Widget

from textual.app import App
from textual_calendar import Calendar

class MyApp(App):
    def compose(self):
        yield Calendar()

if __name__ == "__main__":
    MyApp().run()

Time Widget

from textual_calendar import Time

class MyApp(App):
    def compose(self):
        yield Time(show_tz=True)  # With timezone support

DatetimePicker Widget

from textual_calendar import DatetimePicker
from datetime import datetime

class MyApp(App):
    def compose(self):
        yield DatetimePicker(
            initial_datetime=datetime.now(),
            show_tz=True
        )

Keyboard Shortcuts

Calendar

  • ←/→ - Previous/Next day
  • ↑/↓ - Previous/Next month
  • Page Up/Down - Previous/Next year
  • Insert - Manual date input dialog

Time

  • ←/→ - Move between hour/minute/second
  • ↑/↓ - Increment/Decrement selected field
  • 0-9 - Direct number input

License

BSD-3-Clause License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_calendar-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_calendar-1.0.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file textual_calendar-1.0.0.tar.gz.

File metadata

  • Download URL: textual_calendar-1.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for textual_calendar-1.0.0.tar.gz
Algorithm Hash digest
SHA256 257b1114f485871bcc7e02c3c4914dcd2a4df32852cb910ab1c7e934ddf407d0
MD5 a6a315b7b7e617b3736439a58ab4d158
BLAKE2b-256 75b9149ad348a8219fcd16e9a0ecbd7a3944b3247daa9a7c47d39aafaf03fed8

See more details on using hashes here.

File details

Details for the file textual_calendar-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for textual_calendar-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8021ad0671cc61f2b490741639030fb47f0df6181c86073892096b467d7d1449
MD5 f19bd38a70d82bae89edb5652a854ef8
BLAKE2b-256 538967a27e669f14af1a89f3890bab91d8102a0dbefb7f02599e20f379eb03bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page