A working test of an all-day-event

This commit is contained in:
Janus Knudsen 2025-08-23 23:01:22 +02:00
parent 12df6a9b06
commit 25522bfe17
3 changed files with 16 additions and 2 deletions

View file

@ -16,7 +16,7 @@
--day-column-min-width: 250px;
--week-days: 7;
--header-height: 80px;
--all-day-row-height: 0px; /* Default height for all-day events row */
--all-day-row-height: 40px; /* Default height for all-day events row */
/* Time boundaries - Default fallback values */
--day-start-hour: 0;

View file

@ -143,7 +143,7 @@ swp-time-grid::after {
swp-calendar-header {
display: grid;
grid-template-columns: repeat(var(--grid-columns, 7), minmax(var(--day-column-min-width), 1fr));
grid-template-rows: var(--header-height) auto; /* Row 1: use CSS variable, Row 2: auto-sized for all-day events */
grid-template-rows: var(--header-height) var(--all-day-row-height); /* Row 1: header height, Row 2: all-day events height */
min-width: calc(var(--grid-columns, 7) * var(--day-column-min-width)); /* Dynamic width */
background: var(--color-surface);
border-bottom: 1px solid var(--color-border);
@ -180,6 +180,7 @@ swp-calendar-header::-webkit-scrollbar-track {
swp-day-header {
grid-row: 1; /* Explicitly place day headers in row 1 */
pointer-events: auto; /* Ensure header clicks work despite parent scrollbar */
text-align: center;
border-right: 1px solid var(--color-grid-line);