Skip to main content

📅 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.date object

📦 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
  • When a user clicks a green date, the widget returns the corresponding datetime.date object.


📌 Requirements


🧪 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.

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)

Source distribution for streamlit-calendar-input 0.0.3
File Size Uploaded
streamlit_calendar_input-0.0.3.tar.gz 126.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-calendar-input 0.0.3
File Interpreter ABI Platform
streamlit_calendar_input-0.0.3-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page