im-perativa / streamlit-calendar

A Streamlit component to show calendar view using FullCalendar
https://calendar-component.streamlit.app/
Apache License 2.0
101 stars 10 forks source link

Implemented fullcalendar 'select' callback #23

Closed MaxvandenBoom closed 6 months ago

MaxvandenBoom commented 7 months ago

Hi Muhammad,

Thank you for creating this Streamlit component, and adding custom-css support (which was actually requested by a colleague of mine :). Great work!

I was trying to use the fullcalendar functionality of making a selection by clicking and dragging in the empty space of the calendar, like this: image (Note that "selectable" should be True in the calendar options)

While a 'select' callback is available in fullcalendar (https://fullcalendar.io/docs/select-callback), I noticed that your Streamlit wrapper component didn't provide an implementation for it yet.

As it seemed pretty straightforward, I took the liberty of implementing it and thought you might appreciate the contribution as a pull request. I build upon your most recent release (2 days ago) and followed your style of coding (return format and variable naming). I tested it, and it works flawlessly.

Do you think you could include this in the next release and python package so we can use it out-of-the-box?

Best, Max

im-perativa commented 6 months ago

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on PyPI and GitHub.

im-perativa commented 6 months ago

@MaxvandenBoom thanks for the clean work!