From afd6b5a5c05f2841db2c999f2449df79b95e76e3 Mon Sep 17 00:00:00 2001
From: Linus Rath <139418639+rathlinus@users.noreply.github.com>
Date: Tue, 3 Nov 2026 06:52:24 +0100
Subject: [PATCH] fix: keep event titles readable in month days when the time
and calendar name are on
---
components/calendar/event-card.tsx | 40 +++++++++++++++++-------------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/components/calendar/event-card.tsx b/components/calendar/event-card.tsx
index 3e721770f..0596f3bb9 100644
--- a/components/calendar/event-card.tsx
+++ b/components/calendar/event-card.tsx
@@ -292,15 +292,17 @@ export function EventCard({ event, calendar, variant, onClick, onMouseEnter, onM
...style,
}}
>
-
- {textStyle === "dot" && (
-
- )}
-
{safeFormat(startDate, timeFmt)}
-
{event.title || t("events.no_title")}
- {visibleCalendarName && (
-
{visibleCalendarName}
- )}
+
+
+ {textStyle === "dot" && (
+
+ )}
+ {safeFormat(startDate, timeFmt)}
+ {event.title || t("events.no_title")}
+ {visibleCalendarName && (
+ {visibleCalendarName}
+ )}
+
);
@@ -327,14 +329,18 @@ export function EventCard({ event, calendar, variant, onClick, onMouseEnter, onM
)}
style={{ ...eventFillStyle(color, { inactive: isInactive, selected: isSelected, tinted }), ...style }}
>
-
- {showTimeInMonthView && !event.showWithoutTime && (
-
{format(startDate, timeFmt)}
- )}
-
{event.title || t("events.no_title")}
- {visibleCalendarName && (
-
{visibleCalendarName}
- )}
+ {/* The title comes first: in a narrow day the time and the calendar's
+ name left it no room, or one letter. */}
+
+
+ {showTimeInMonthView && !event.showWithoutTime && (
+ {format(startDate, timeFmt)}
+ )}
+ {event.title || t("events.no_title")}
+ {visibleCalendarName && (
+ {visibleCalendarName}
+ )}
+
);