widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.91k stars 142 forks source link

Highlight dates in solara.lab.InputDate #818

Open mikelzabala opened 1 month ago

mikelzabala commented 1 month ago

I would like to highlight certain dates in the InputDate widget or limit the selection to specific dates, similar to the functionality provided in the Panel DatePicker (https://panel.holoviz.org/reference/widgets/DatePicker.html).

iisakkirotko commented 1 month ago

Hi @mikelzabala!

Although Solara's InputDate doesn't support these options directly, I think everything you mentioned should be possible through ipyvuetify's date picker, which you can use through solara.v.DatePicker. However, taking that route is a bit more work for the user, and I think it would be good to at least have the option to limit selection to specific dates natively in Solara. Implementing these options should amount to exposing the ipyvuetify date picker's allowed_dates in solara/lab/components/input_date.py. Would you like to open a PR for that?

mikelzabala commented 1 month ago

hi, yes that would be great!