fix: a calendar event that ends after midnight keeps its end time (#33290)

This commit is contained in:
G30 2026-10-28 13:23:15 -04:00 • committed by GitHub
parent 0ac55c8e72
commit a8e8e7e792
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,7 +142,7 @@
loading = true;
try {
const startNs = dateTimeToNs(startDate, allDay ? '00:00' : startTime);
const endDays = overnight && !endsPastMidnight() ? 0 : endDayOffset;
const endDays = endsPastMidnight() ? Math.max(endDayOffset, 1) : overnight ? 0 : endDayOffset;
const shiftedEndDate = endDate
? nsToDateStr(dateTimeToNs(startDate, '12:00') + endDays * 24 * 60 * 60 * 1000 * NS)
: '';