From 95d21c49a9797da5d9e9ee097a00a3f34ae209dd Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 10 Oct 2026 22:38:59 +0200 Subject: [PATCH] feat(calendar): open a day from the week header and show a clearer now line The week and day headers now show a small weekday above a large date, with today's date in a filled circle and its weekday in the primary colour. Clicking a date in the week header opens that day in the day view. The all-day row moved below the dates, where it lines up with the columns it belongs to. The current time line is thicker with a larger dot at the start of today's column, and events shorter than 45 minutes show their start time next to the title instead of hiding it. --- components/calendar/calendar-app.tsx | 12 +++ components/calendar/calendar-day-view.tsx | 33 +++++-- components/calendar/calendar-week-view.tsx | 106 ++++++++++++--------- components/calendar/event-card.tsx | 10 +- 4 files changed, 102 insertions(+), 59 deletions(-) diff --git a/components/calendar/calendar-app.tsx b/components/calendar/calendar-app.tsx index 67d00fd61..53aa4d2b8 100644 --- a/components/calendar/calendar-app.tsx +++ b/components/calendar/calendar-app.tsx @@ -566,6 +566,17 @@ export function CalendarApp({ linkSegments: routeSegments }: CalendarAppProps = setNarrowSidebarOpen(false); }, [setSelectedDate, jumpTo, isMobile, normalizedViewMode, setViewMode]); + // Clicking a date number in the week or month header opens that day in + // the day view, as in Google Calendar. + const handleOpenDay = useCallback((date: Date) => { + setMobileReturnToMonth(isMobile && normalizedViewMode === "month"); + jumpTo(date); + setSelectedDate(date); + setMiniMonth(date); + setViewMode("day"); + setNarrowSidebarOpen(false); + }, [jumpTo, setSelectedDate, setViewMode, isMobile, normalizedViewMode]); + // The mini calendar is a navigation control: unlike a click in the week or // month grid, which marks a day that is already on screen, picking a day // here has to bring that day into view. @@ -1485,6 +1496,7 @@ export function CalendarApp({ linkSegments: routeSegments }: CalendarAppProps = events={visibleEvents} calendars={allCalendars} onSelectDate={handleSelectDate} + onOpenDay={handleOpenDay} onSelectEvent={handleSelectEvent} onHoverEvent={handleHoverEvent} onHoverLeave={handleHoverLeave} diff --git a/components/calendar/calendar-day-view.tsx b/components/calendar/calendar-day-view.tsx index 412fefd28..5911fe3c7 100644 --- a/components/calendar/calendar-day-view.tsx +++ b/components/calendar/calendar-day-view.tsx @@ -313,13 +313,26 @@ export function CalendarDayView({ const dayTasks = tasksByDay.get(key) ?? []; return (