Hi, I have created streamlit_calendar, a custom component to display calendar view in Streamlit using FullCalendar package. This package provides a way to create a calendar with multiple view configuration such as DayGrid, TimeGrid, List, MultiMonth, and more. The calendar also support dark/light theme and provide simple eventClick and dateClick callback.
Here is a demo of the package with multiple view configuration:
Install the package: pip install streamlit_calendar
Hi, thanks for the feedback. The eventset under the calendar in the demo is just for demonstration purpose. You can hide it by not storing and exposing the variable returned from streamlit_calendar() function.
@Matthijs@lkdd-ao sorry I’m not sure if injecting CSS is available now and I haven’t seen st.markdown works for custom component (cmiiw).
The only customization you can do right now is from streamlit theming variable only (simple primaryColor, backgroundColor, etc)
Contributions are most welcomed!
HI @im-perativa , thank you for the reply! I got the CSS changes to work by adding them to the CSS file in streamlit_calendar/frontend/build/static/css. This is of course not a very elegant solution.
My suggestion would be to add an option to the calendar function, like:
calendar = calendar(events=data, options=calendar_options, custom_css=“file_path”)
Which then appends the CSS from the file to the one in the package. What do you think?
I’m very unfamiliar with making changes/contributions to packages, but will give it a go if you think this is a good solution.
Hey, Thanks for this cool stuff, But there is a problem with it, when the data in events list changes, the calendar is not updated, even rerunning the streamlit app doesn’t update it, only refreshing browser updates the calendar. Is there a fix for it?