From 3815a13ef96430d77484536b605ff693fa772f9a Mon Sep 17 00:00:00 2001 From: lenhanphung Date: Wed, 24 Sep 2025 11:27:47 +0700 Subject: [PATCH] feat(calendar): update week start day and scroll time - Change firstDay from 0 (Sunday) to 1 (Monday) to start week on Monday - Update scrollTime from current time to 12:00 PM for better user experience - Remove dynamic scroll calculation in favor of fixed noon position --- src/components/Calendar/Calendar.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Calendar/Calendar.tsx b/src/components/Calendar/Calendar.tsx index 66badf0..ba735f0 100644 --- a/src/components/Calendar/Calendar.tsx +++ b/src/components/Calendar/Calendar.tsx @@ -320,7 +320,7 @@ export default function CalendarApp() { }} plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]} initialView="timeGridWeek" - firstDay={0} + firstDay={1} editable={true} selectable={true} timeZone="local" @@ -363,9 +363,7 @@ export default function CalendarApp() { weekNumberFormat={{ week: "long" }} slotDuration={"01:00:00"} slotLabelInterval={"01:00:00"} - scrollTime={new Date(Date.now() - 2 * 60 * 60 * 1000) - .toTimeString() - .slice(0, 5)} + scrollTime="12:00:00" unselectAuto={false} allDayText="" slotLabelFormat={{