diff --git a/src/routes/calendar.index.tsx b/src/routes/calendar.index.tsx index 60a71e3..5083497 100644 --- a/src/routes/calendar.index.tsx +++ b/src/routes/calendar.index.tsx @@ -301,7 +301,8 @@ function CalendarPage() { const eventsByDay = useMemo(() => { const m = new Map(); for (const e of visibleEvents) { - const key = e.start.slice(0, 10); + // Bucket events by their EST calendar day, not the raw UTC ISO date. + const key = e.all_day ? e.start.slice(0, 10) : formatInEST(e.start, "yyyy-MM-dd"); const arr = m.get(key) ?? []; arr.push(e); m.set(key, arr); @@ -875,7 +876,7 @@ function MonthGrid({ )} title={e.title} > - {!e.all_day && format(parseISO(e.start), "h:mma ")} + {!e.all_day && formatInEST(e.start, "h:mma ")} {e.title} ); @@ -942,7 +943,7 @@ function WeekStrip({ className={cn("text-[11px] px-1.5 py-1 rounded truncate text-white", meta.bg)} title={e.title} > - {!e.all_day && format(parseISO(e.start), "h:mma ")} + {!e.all_day && formatInEST(e.start, "h:mma ")} {e.title} ); @@ -1010,8 +1011,8 @@ function EventRow({
- {showDate && {format(parseISO(evt.start), "EEE, MMM d")}} - {!evt.all_day && {format(parseISO(evt.start), "h:mm a")}} + {showDate && {formatInEST(evt.start, "EEE, MMM d")}} + {!evt.all_day && {formatInEST(evt.start, "h:mm a")} EST} {evt.all_day && All day} {evt.case_label && ยท {evt.case_label}} {evt.client_label && !evt.case_label && (