fix: calendar day view - key-based remount workaround for react-big-calendar DnD

This commit is contained in:
Hermes
2026-08-01 12:32:13 +00:00
parent 4693f81095
commit 60dd5a8280
+3 -10
View File
@@ -255,7 +255,9 @@ function CalendarPage() {
</div>
<div className="rbc-calendar-container" style={{ minHeight: isMobile ? 400 : 600 }}>
{/* Key={view} forces remount on view change (workaround for react-big-calendar DnD day view issue) */}
<DragAndDropCalendar
key={'cal-' + view + '-' + (isMobile ? 'm' : 'd')}
localizer={localizer}
events={calendarEvents}
startAccessor="start"
@@ -275,16 +277,7 @@ function CalendarPage() {
showMultiDayTimes
components={{
event: EventComponent,
toolbar: (props: any) => (
<CustomToolbar
{...props}
currentView={view}
onView={(newView: string) => {
props.onView(newView);
setView(newView);
}}
/>
),
toolbar: (props: any) => <CustomToolbar {...props} currentView={view} />,
}}
views={["month", "week", "work_week", "day", "agenda"]}
step={30}