Fix NoneType strftime error in events calendar grid

Guard day_date.strftime() call with None check — day_cell.date can
be None for empty grid cells.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 23:31:00 +00:00
parent 1c794b6c0e
commit e65232761b

View File

@@ -559,7 +559,8 @@ def _calendar_main_panel_html(ctx: dict) -> str:
parts.append(f'<div class="{cell_cls}">')
parts.append('<div class="flex justify-between items-center"><div class="flex flex-col">')
parts.append(f'<span class="sm:hidden text-[16px] text-stone-500">{day_date.strftime("%a")}</span>')
if day_date:
parts.append(f'<span class="sm:hidden text-[16px] text-stone-500">{day_date.strftime("%a")}</span>')
# Clickable day number
if day_date: