Gradio component for selecting dates with a calendar 📆
Project description
gradio_calendar 📅
A calendar component that lets users pick dates!
Preprocessing
: The date passed to the python function will be a string formatted as YYYY-MM-DD or a datetime.datetime object
depending on the value of the type parameter.
Postprocessing
: The value returned from the function can be a string or a datetime.datetime object.
Example usage
import gradio as gr
from gradio_calendar import Calendar
import datetime
def is_weekday(date: datetime.datetime):
return date.weekday() < 5
demo = gr.Interface(is_weekday,
[Calendar(type="datetime", label="Select a date")],
gr.Label(label="Is it a weekend?"))
demo.launch()
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
gradio_calendar-0.0.1.tar.gz
(23.6 kB
view hashes)
Built Distribution
Close
Hashes for gradio_calendar-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e679b3727161eda23187b8be5bce90e191ee59572a44a2ea0340a3ec409db1b3 |
|
MD5 | 26f7030f9eb3a2a54d3fef682865682d |
|
BLAKE2b-256 | 565a3b134446f0012d3bcda4c288cf2338aa3085e9fa8540c85e08698d8497f6 |