Make the management week calendar cover the full 24 hours

DEFAULT_DAY_START_HOUR/DEFAULT_DAY_END_HOUR only widened the grid's
default 08:00-22:00 window for an event outside it, on whichever end
that event fell on -- so a single early-morning event (e.g. one starting
at midnight) widened the start but left the end clipped at 22:00 rather
than covering the full day. Default the window to the full day (0-24)
instead; the same expansion logic still guards a pathological
almost-midnight-ending event, it just never needs to trigger anymore.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-21 14:24:43 +02:00
parent 397b9cf687
commit f4429263d3
2 changed files with 17 additions and 13 deletions

View File

@@ -19,10 +19,13 @@ import datetime
from django.utils import timezone
#: The week grid's default visible hours -- expanded automatically (see week_grid)
#: if an event falls outside it, so nothing is ever clipped out of view.
DEFAULT_DAY_START_HOUR = 8
DEFAULT_DAY_END_HOUR = 22
#: The week grid's visible hours -- the full day, always, so nothing is ever
#: scrolled out of view regardless of what time events happen to fall at (this
#: used to default to a narrower 08:00-22:00 window, only widening for events
#: outside it -- a very early or very late one still left the grid clipped at
#: the other end, e.g. midnight..22:00 rather than the full day).
DEFAULT_DAY_START_HOUR = 0
DEFAULT_DAY_END_HOUR = 24
#: Floor on a block's rendered height, in percent of the visible hour span -- a very
#: short event (a 15-minute weigh-in) would otherwise render as a sliver too thin to