fix(view/calendar): end date offset on display

This commit is contained in:
Elian Doran 2025-02-16 13:34:39 +02:00
parent 6d3325766d
commit ee5cc18ef2
No known key found for this signature in database

View File

@ -208,10 +208,8 @@ export default class CalendarView extends ViewMode {
noteId: note.noteId noteId: note.noteId
}; };
const endDate = CalendarView.#offsetDate(note.getAttributeValue("label", "endDate") ?? startDate, -1); const endDate = CalendarView.#offsetDate(note.getAttributeValue("label", "endDate") ?? startDate, 1);
if (endDate) { if (endDate) {
// Fullcalendar end date is exclusive, not inclusive.
endDate.setDate(endDate.getDate() + 1);
eventData.end = CalendarView.#formatDateToLocalISO(endDate); eventData.end = CalendarView.#formatDateToLocalISO(endDate);
} }