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:
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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2622860592d882c0614ff896ae3e7e89841f4bbf65f592aeedcd419a5609655f |
|
MD5 | 5d194a89aed9fa26e89142e9ba62461a |
|
BLAKE2b-256 | 0e10d4ab8103ace627be9267b0a2bece695c26b7a005adc4985f2f23bd7b8e68 |
File details
Details for the file textual_datepicker-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: textual_datepicker-0.2.0-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.15.0-56-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6839d456f559d569f7ff835d63d041f721ea70fc6646fd549912f5859fbd4bb |
|
MD5 | 8a5c7f71c9526f6a247ea87161c1b2eb |
|
BLAKE2b-256 | fdffd63cb9bf667a4b7268c30363e50bf03bbcc57b1537e6941d4ecd5be00b9e |