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:

  • 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.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

textual_datepicker-0.2.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: textual_datepicker-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 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.2.0.tar.gz
Algorithm Hash digest
SHA256 2622860592d882c0614ff896ae3e7e89841f4bbf65f592aeedcd419a5609655f
MD5 5d194a89aed9fa26e89142e9ba62461a
BLAKE2b-256 0e10d4ab8103ace627be9267b0a2bece695c26b7a005adc4985f2f23bd7b8e68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for textual_datepicker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6839d456f559d569f7ff835d63d041f721ea70fc6646fd549912f5859fbd4bb
MD5 8a5c7f71c9526f6a247ea87161c1b2eb
BLAKE2b-256 fdffd63cb9bf667a4b7268c30363e50bf03bbcc57b1537e6941d4ecd5be00b9e

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