Metadata-Version: 2.1
Name: gradio_calendar
Version: 0.0.1
Summary: Gradio component for selecting dates with a calendar 📆
Author-email: YOUR NAME <YOUREMAIL@domain.com>
License-Expression: MIT
Keywords: calendar,forms,gradio-custom-component,gradio-template-Fallback,time
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.8
Requires-Dist: gradio<5.0,>=4.0
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown


# 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


```python
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()

```


![](https://github.com/freddyaboulton/gradio-datepicker/assets/41651716/be2ffff3-4db5-4f12-9f6d-237acb1d1f96)