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 inital 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:

  • Mouse interaction is not yet implemented.
  • 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.1.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

textual_datepicker-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file textual_datepicker-0.1.1.tar.gz.

File metadata

  • Download URL: textual_datepicker-0.1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-56-generic

File hashes

Hashes for textual_datepicker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b82f7e3e77a7b4e08bc2f8131a73c65a64efce0cfd4f824b0f7f4a3febbee265
MD5 5c1d2c5d29b0c5a2dbb86cb455cb8290
BLAKE2b-256 2297ab159187bbe73a2505d89d8d8219dc92c30dd903f99a08cc64597e42eb89

See more details on using hashes here.

File details

Details for the file textual_datepicker-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for textual_datepicker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb982e2c2c123c6384866178c1d7c350b61af6228cb00a1e51028245a49d8e49
MD5 864a168c754b397768455fbe6a04a3fc
BLAKE2b-256 743b80c061af6041a9d629009460298352efc2f8790280ecffda2f4b93ae4974

See more details on using hashes here.

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