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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: textual_datepicker-0.2.3.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.19.0-35-generic

File hashes

Hashes for textual_datepicker-0.2.3.tar.gz
Algorithm Hash digest
SHA256 8f3bc38a81ad7a8258e6c241e56b3f2845605875c2af204c0f8f13803da7a4b2
MD5 c8730c1f99f27f7aa17b5d0b1bab3a8e
BLAKE2b-256 4867d434797200068dd700a84be72125634d8cff74a55d39ddf8b29a6c40aee4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: textual_datepicker-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-35-generic

File hashes

Hashes for textual_datepicker-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b1e63fc356b33acac85c325d26c2db86b0e08efe9366a6db334403fcdc1b16e8
MD5 eef2a2efbd4540d12c2fd1273c2e9513
BLAKE2b-256 82a6de244f9c61552b7b07ac9be13b6f569954b2eb526e9860b23b36a8e053ec

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