Skip to main content

A datepicker widget for Textual.

Project description

Textual: DatePicker

A DatePicker widget for textual. It can be used standalone or with a DateSelect opening the dialog.

DateSelect with DatePicker example:

DateSelect with DatePicker

Usage

from textual_datepicker import DateSelect

DateSelect(
  placeholder="please select",
  format="YYYY-MM-DD",
  picker_mount="#main_container"
)

Define an initial value:

import pendulum
from textual_datepicker import DateSelect

DateSelect(
  placeholder="please select",
  format="YYYY-MM-DD",
  date=pendulum.parse("2023-02-14"),
  picker_mount="#main_container"
)

Installation

pip install textual-datepicker

Requires textual 0.6.0 or later.

Limitations

This textual widget is in early stage and has some limitations:

  • It can only open below, not above: Make sure to reserve space below for the dialog.
  • It needs a specific mount point (picker_mount) where the dialog shall appear. This is needed because the container widget with the select itself could be too small. Maybe in future versions this will no longer be needed.

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_datepicker-0.2.4.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

textual_datepicker-0.2.4-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

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