You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] sliceMultiDayEvents: sliced sub-events after the first start at 23:59 instead of next-day 00:00 #4206
With sliceMultiDayEvents: true, a multi-day event is split into per-day slices (1/n), (2/n), … Every slice after the first is displayed as starting at 23:59 instead of the following day's 00:00.
Cause
modules/default/calendar/calendar.js, in the slicing loop (around L513–535):
letmidnight=eventStartDateMoment.clone().startOf("day").add(1,"day").endOf("day");
...
event.startDate=midnight.format("x");// start of the NEXT slice
...
midnight=midnight.clone().add(1,"day").endOf("day");
midnight is .endOf("day") (= 23:59:59.999), but it is assigned as the following slice's startDate. So each subsequent slice starts at 23:59:59.999 of the previous day instead of 00:00 of its own day, which is what gets rendered as "… 23:59".
Fix
Use the start of the day for the next slice's start:
Thanks for the quick review! 🙌 Yes, I'm happy to open a PR with the fix, including a regression test for the sliced sub-event start time (asserting subsequent slices start at the next day's 00:00 rather than 23:59). I'll get that ready.
Opened #4208 with the one-line fix plus an electron regression test (a timed multi-day event spanning several midnights; asserts every slice starts at 00:00 and never 23:59 — fails without the fix). Thanks for the quick review! 🙏
Fixed via #4208 (merged into develop). The one-line fix in sliceMultiDayEvents now sets sliced sub-events to next-day 00:00 instead of 23:59, with a regression test covering the case.
Activity
KristjanESPERANTO commentedon Jul 17, 2026
Looks like a real bug to me. And the suggested solution looks good, too 👍
Would you like to create a PR? Maybe even with a regression test.
ago1776 commentedon Jul 17, 2026
Thanks for the quick review! 🙌 Yes, I'm happy to open a PR with the fix, including a regression test for the sliced sub-event start time (asserting subsequent slices start at the next day's 00:00 rather than 23:59). I'll get that ready.
ago1776 commentedon Jul 17, 2026
Opened #4208 with the one-line fix plus an electron regression test (a timed multi-day event spanning several midnights; asserts every slice starts at 00:00 and never 23:59 — fails without the fix). Thanks for the quick review! 🙏
ago1776 commentedon Jul 17, 2026
Fixed via #4208 (merged into
develop). The one-line fix insliceMultiDayEventsnow sets sliced sub-events to next-day 00:00 instead of 23:59, with a regression test covering the case.