From dcc35335f5891c7e907d4f04e0ff9c03e18059ee Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:42:07 +0100 Subject: [PATCH] feat: add setting to show event start time in month view --- components/calendar/event-card.tsx | 4 ++++ components/settings/calendar-settings.tsx | 11 +++++++++++ locales/en/common.json | 4 +++- stores/settings-store.ts | 7 +++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/components/calendar/event-card.tsx b/components/calendar/event-card.tsx index e45bfa93..40908ac1 100644 --- a/components/calendar/event-card.tsx +++ b/components/calendar/event-card.tsx @@ -70,6 +70,7 @@ export function EventCard({ event, calendar, variant, onClick, onMouseEnter, onM const color = getEventColor(event, calendar); const startDate = parseISO(event.start); const timeFormat = useSettingsStore((state) => state.timeFormat); + const showTimeInMonthView = useSettingsStore((state) => state.showTimeInMonthView); const timeFmt = timeFormat === "12h" ? "h:mm a" : "HH:mm"; const calendarName = calendar?.name || ""; @@ -156,6 +157,9 @@ export function EventCard({ event, calendar, variant, onClick, onMouseEnter, onM style={{ backgroundColor: `${color}24`, borderLeft: `3px solid ${color}`, color, ...style }} >
+ {showTimeInMonthView && !event.showWithoutTime && ( + {format(startDate, timeFmt)} + )} {event.title || t("events.no_title")}
diff --git a/components/settings/calendar-settings.tsx b/components/settings/calendar-settings.tsx index d399b538..6f858f4a 100644 --- a/components/settings/calendar-settings.tsx +++ b/components/settings/calendar-settings.tsx @@ -14,6 +14,7 @@ export function CalendarSettings() { const { timeFormat, firstDayOfWeek, + showTimeInMonthView, calendarNotificationsEnabled, calendarNotificationSound, calendarInvitationParsingEnabled, @@ -57,6 +58,16 @@ export function CalendarSettings() { /> + + updateSetting('showTimeInMonthView', checked)} + /> + + ()( sendConfirmation: state.sendConfirmation, defaultReplyMode: state.defaultReplyMode, sessionTimeout: state.sessionTimeout, + showTimeInMonthView: state.showTimeInMonthView, calendarNotificationsEnabled: state.calendarNotificationsEnabled, calendarNotificationSound: state.calendarNotificationSound, calendarInvitationParsingEnabled: state.calendarInvitationParsingEnabled,