im-perativa / streamlit-calendar Goto Github PK
View Code? Open in Web Editor NEWA Streamlit component to show calendar view using FullCalendar
Home Page: https://calendar-component.streamlit.app/
License: Apache License 2.0
A Streamlit component to show calendar view using FullCalendar
Home Page: https://calendar-component.streamlit.app/
License: Apache License 2.0
I'm having an issue when using the calendar inside a tab where only a little part of the calendar is displayed. The calendar gets back to normal after interaction with it by clicking on the calendar buttons.
This only happens when the calendar is in a tab that is not the first tab. Example code below:
tab1, tab2 = st.tabs("tab1", "tab2")
with tab1:
show_calendar()
with tab2:
pass
tab1, tab2 = st.tabs("tab1", "tab2")
with tab1:
pass
with tab2:
show_calendar()
When I used โlistโ model and clicked the event๏ผthen error happened.
No matter in the online demo or in my local environment.
The error like this:
Component Error
Converting circular structure to JSON --> starting at object with constructor 'HTMLDivElement' | property '__reactInternalInstance$i4o8rs9dx7q' -> object with constructor 'Hl' --- property 'stateNode' closes the circle****
Thanks for developing this component.
I have an issue where if I click on the calendar (anywhere, even on blank area), it causes Streamlit to re-run the entire page.
I want the calendar to be completely read-only with no click events allowed.
I have "selectable": False
in the config dict. Any suggestions?
My code:
...
resources = []
for _, event in events.iterrows():
resource = {
"id": event["event_service_id"],
"address": event["formatted_address"],
"title": event["customer_name"]
}
resources.append(resource)
calendar_options = {
"initialDate": events["event_start_date"].min(),
"initialView": "dayGridMonth",
"headerToolbar": {
"left": "prev,next",
"center": "title",
"right": "dayGridWeek,dayGridDay"
},
"resources": resources,
"resourceGroupField": "address",
"slotDuration": "00:30:00",
"slotMinTime": "00:00:00",
"slotMaxTime": "23:59:99",
"selectable": False
}
calendar_events = []
for _, event in events.iterrows():
title = "\n".join([event["provider"], event["event_type"], event["event_description"], event["event_status"]])
calendar_event = {
"title": title,
"start": event["event_start_timestamp"],
"end": event["event_end_timestamp"],
"resourceId": event["event_service_id"]
}
calendar_events.append(calendar_event)
custom_css="""
.fc-event-past {
opacity: 0.8;
}
.fc-event-time {
font-style: italic;
}
.fc-event-title {
font-weight: 700;
}
.fc-toolbar-title {
font-size: 1.5rem;
}
"""
cont1 = self.container.container()
cont2 = self.container.container()
cal = calendar(events=calendar_events, options=calendar_options, custom_css=custom_css)
with cont1:
cal
cont2.expander("Show events data").dataframe(
events,
hide_index=True
)
....
is Docs Event Dragging & Resizing now available in this patch from streamlit_calendar
I know you cound do that with fullcalendar, but I couldn't find a way to do that on streamlit.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@types/react
, @types/react-dom
, react
, react-dom
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@fullcalendar/adaptive
, @fullcalendar/interaction
, @fullcalendar/list
, @fullcalendar/multimonth
, @fullcalendar/react
, @fullcalendar/resource
, @fullcalendar/resource-daygrid
, @fullcalendar/resource-timegrid
, @fullcalendar/resource-timeline
, @fullcalendar/scrollgrid
, @fullcalendar/timegrid
, @fullcalendar/timeline
).github/workflows/ci.yml
actions/checkout v3
actions/setup-python v3
abatilo/actions-poetry v2.1.0
actions/setup-python v3
actions/checkout v3
abatilo/actions-poetry v2.1.0
bjoluc/semantic-release-config-poetry v2
streamlit_calendar/frontend/package.json
@fullcalendar/adaptive ^6.1.9
@fullcalendar/core ^6.1.9
@fullcalendar/daygrid ^6.1.9
@fullcalendar/interaction ^6.1.9
@fullcalendar/list ^6.1.9
@fullcalendar/multimonth ^6.1.9
@fullcalendar/react ^6.1.9
@fullcalendar/resource ^6.1.9
@fullcalendar/resource-daygrid ^6.1.9
@fullcalendar/resource-timegrid ^6.1.9
@fullcalendar/resource-timeline ^6.1.9
@fullcalendar/rrule ^6.1.9
@fullcalendar/scrollgrid ^6.1.9
@fullcalendar/timegrid ^6.1.9
@fullcalendar/timeline ^6.1.9
react ^16.13.1
react-dom ^16.13.1
streamlit-component-lib ^2.0.0
styled-components ^6.0.8
@types/node ^12.0.0
@types/react ^16.9.0
@types/react-dom ^16.9.0
react-scripts ^5.0.1
typescript ^4.2.0
pyproject.toml
poetry-core >=1.0.0
pyproject.toml
python ^3.8
streamlit ^1.12.0
watchdog ^2.1.9
black ^22.6.0
isort ^5.10.1
bandit ^1.7.5
I just wanted to tell you - thank you. I was looking for a calendar component for streamlit for ages (can't make one myself unfortunately).
Especially love the resource-timeline view. Could you maybe add a few events to the demo app for resource-timeline view?
Hi,
I am trying to add eventClick functionality such as:
https://fullcalendar.io/docs/eventClick-demo
to the streamlit-calender component using the following calender_options:
calendar_options = { "headerToolbar": { "left": "today prev,next", "center": "title", "right": "resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth", }, "slotMinTime": "06:00:00", "slotMaxTime": "18:00:00", "initialView": "resourceTimelineDay", "eventClick": { "event": { "title": 'my event', }, "view": { "type": 'my event view', } }, }
however, this does not produce the resulting effect of viewing the calender event/ information upon eventClick.
I'm looking for your support on this matter. Thank you.
The size of the table in resource-timeline is too long and adds a lot of whitespace below the last row. Also, it doesn't draw the horizontal rule for the last row. How can this be adjusted (perhaps, via custom css or another way)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.