Implement accurate time-based event positioning in week view

- Add calculate_event_position() function to convert UTC times to pixel coordinates
- Position events based on actual start/end times with 60px per hour scaling
- Handle timezone conversion from UTC to local time for proper display
- Implement dynamic event heights that stretch from start to end time
- Add special handling for all-day events positioned at top of day columns
- Create enhanced event display with title and formatted time information
- Style all-day events distinctly with gradient background and italic text
- Filter events to show only those belonging to specific dates
- Add CSS styling for event titles, times, and all-day event appearance
- Support minimum 20px height for very short events and multi-day capping

Events now render at their correct times making week view much more useful for scheduling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Connor Johnstone
2025-08-29 10:31:09 -04:00
parent dacc18fe5d
commit 5d0628878b
2 changed files with 102 additions and 9 deletions

View File

@@ -644,6 +644,27 @@ body {
border-color: #ff9800;
}
.week-event .event-title {
font-weight: 600;
margin-bottom: 2px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.week-event .event-time {
font-size: 0.65rem;
opacity: 0.9;
font-weight: 400;
}
.week-event.all-day {
opacity: 0.9;
border-left: 4px solid rgba(255,255,255,0.5);
font-style: italic;
background: linear-gradient(135deg, var(--event-color, #3B82F6), rgba(255,255,255,0.1)) !important;
}
/* Legacy Week Grid (for backward compatibility) */
.week-grid {
display: grid;