📅 Streamlit Calendar Input
A custom Streamlit calendar widget that lets users select dates from a list of available options. Dates are shown month-by-month, with green marking available days and red marking unavailable ones.
🔧 Features
- 📆 Interactive calendar input widget for Streamlit
- ✅ Green: Available dates
- ❌ Red: Unavailable dates
- 🖱️ Click to select a date
- 🔄 Returns a Python
datetime.dateobject
📦 Installation
pip install streamlit-calendar-input
🚀 Usage
import streamlit as st
from streamlit_calendar_input import calendar_input
import datetime
# Define available dates (e.g. from your backend, bookings, etc.)
available_dates = [
datetime.date(2025, 6, 20),
datetime.date(2025, 6, 25),
datetime.date(2025, 7, 2),
]
# Call the calendar input
selected_date = calendar_input(available_dates)
# Display the selected date
if selected_date:
st.success(f"You selected: {selected_date}")
🧠 How it Works
-
The widget renders a calendar month by month.
-
Each day is color-coded:
- ✅ Green: Clickable, available in
available_dates - ❌ Red: Not clickable, unavailable
- ✅ Green: Clickable, available in
-
When a user clicks a green date, the widget returns the corresponding
datetime.dateobject.
📌 Requirements
- Python 3.7+
- Streamlit 1.0+
🧪 Development
# Clone the repo
git clone https://github.com/yourusername/streamlit-calendar-input.git
cd streamlit-calendar-input
# (Optional) Create a virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -e .
📝 License
MIT License. See LICENSE for more details.
Metadata
Release files for streamlit-calendar-input 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit_calendar_input-0.0.3.tar.gz | 126.0 kB | Without provenance | Details for streamlit_calendar_input-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_calendar_input-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for streamlit_calendar_input-0.0.3-py3-none-any.whl |
Total release size: 251.9 kB
Release files / streamlit_calendar_input-0.0.3.tar.gz
| Download URL | streamlit_calendar_input-0.0.3.tar.gz |
|---|---|
| Size | 126.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5cccaaaac1b515a086d406c7943814ac9557553e6ae78a4fc588a2f8a722f8fd
|
|
BLAKE2b-256 checksum How to use checksums |
b63b1a78a113a682a8f195b8fda16efaf2951031f785bc982105596b69fc5585
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / streamlit_calendar_input-0.0.3-py3-none-any.whl
| Download URL | streamlit_calendar_input-0.0.3-py3-none-any.whl |
|---|---|
| Size | 125.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daf70cc3aff9b28fead77921b833c912c3f91e180656315ba9de78eb443eee95
|
|
BLAKE2b-256 checksum How to use checksums |
02a3d7e89b4e626ad446d792d738337449b52604e77e022d47e73d65a7c0d1aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for streamlit-calendar-input 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.