Fix timezone issue in widget

This commit is contained in:
2026-03-11 13:35:31 +01:00
parent 6162ff595f
commit 97d9647ea2
3 changed files with 7 additions and 1 deletions

View File

@@ -172,6 +172,9 @@
} }
syncCalendarToday(replacement); syncCalendarToday(replacement);
calendar.replaceWith(replacement); calendar.replaceWith(replacement);
if (Luxtools.initChronologicalEventTimes) {
Luxtools.initChronologicalEventTimes();
}
} }
function loadCalendarMonth(calendar, targetYear, targetMonth, persistState) { function loadCalendarMonth(calendar, targetYear, targetMonth, persistState) {

View File

@@ -185,4 +185,6 @@
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
if (Scratchpads && Scratchpads.init) Scratchpads.init(); if (Scratchpads && Scratchpads.init) Scratchpads.init();
}, false); }, false);
Luxtools.initChronologicalEventTimes = initChronologicalEventTimes;
})(); })();

View File

@@ -241,7 +241,8 @@ class ChronologicalCalendarWidget
$html .= '<li class="luxtools-calendar-event"' . $style . $dataAttrs . '>'; $html .= '<li class="luxtools-calendar-event"' . $style . $dataAttrs . '>';
if ($showTimes && !$event->allDay && $event->time !== '') { if ($showTimes && !$event->allDay && $event->time !== '') {
$html .= '<span class="luxtools-calendar-event-time">' . hsc($event->time) . '</span>'; $html .= '<span class="luxtools-calendar-event-time luxtools-event-time" data-luxtools-start="'
. hsc($event->startIso) . '">' . hsc($event->time) . '</span>';
} }
$html .= '<span class="luxtools-calendar-event-title">' . hsc($event->summary) . '</span>'; $html .= '<span class="luxtools-calendar-event-title">' . hsc($event->summary) . '</span>';
$html .= '</li>'; $html .= '</li>';