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?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.