Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented fullcalendar 'datesSet' callback #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaxvandenBoom
Copy link
Contributor

Hi Muhammad,

I noticed that the fullcalendar Streamlit component did not have a callback for date changes in the fullcalender yet. This is handy, for example, when the prev/next buttons are used in the calendar. As such, I implemented the fullcalendar's datesSet callback (https://fullcalendar.io/docs/datesSet) and wanted to share it.

For this update, I build upon your most recent release (22 dec 2023) and followed your style of coding (return format and variable naming).

One problem though: when the calendar’s dates change, both datesSet and eventsSet are triggered. I think setComponent causes only eventsSet to be triggered. As a result, the datesSet callback only works when there is no eventsSet callback requested. I added a warning in the component creation, but maybe you can think of a more elegant solution...

Best,
Max

@MaxvandenBoom
Copy link
Contributor Author

@im-perativa little bump in case you missed it!

@im-perativa
Copy link
Owner

@MaxvandenBoom thanks for your contribution and sorry for such late reply. Initially i create this package to provide a simple calendar function in streamlit and I'm not sure if we should add every callback to it because in the end we also limited by the streamlit capabilites.

For now, I believe a comprehensive tests with all original callback and their impact with each other should be done first and then we can add all compatible callbacks to this package in a single release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants