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

@ -65,6 +65,19 @@ export class DateHeaderRenderer implements HeaderRenderer {
const weekDays = config.getDateViewSettings().weekDays;
const daysToShow = dates.slice(0, weekDays);
// TEST: Add a simple test event for Monday (column 1)
const testEvent = document.createElement('swp-allday-event');
testEvent.textContent = 'TEST ALL-DAY EVENT';
testEvent.style.gridColumn = '1';
testEvent.style.gridRow = '2';
testEvent.style.backgroundColor = 'orange';
testEvent.style.color = 'white';
testEvent.style.padding = '4px';
testEvent.style.fontSize = '12px';
testEvent.style.fontWeight = 'bold';
calendarHeader.appendChild(testEvent);
console.log('🧪 Added test all-day event to row 2, column 1');
// Process each all-day event to calculate its span
allDayEvents.forEach(event => {
const startDate = new Date(event.start);