DEV Community

kkrishnan10
kkrishnan10

Posted on

Release 0.3 — Fixing All-Day Events Displaying as Two Days

For my first PR in Release 0.3, I decided to fix an issue in the Open Web Calendar project where all-day events were showing incorrectly as two-day spans. This bug had been reported by multiple users and required me to go deeper into the frontend event-rendering logic in calendar.js.

I started by running the project locally, comparing real ICS behavior, reading the DHTMLX scheduler documentation, and tracing how the app determines whether a start and end time represent a one-day duration. Eventually I discovered that ICS all-day events use an exclusive end date, which meant the calendar was interpreting them as starting at midnight on Day 1 and ending at midnight on Day 2.

My fix adjusted the date-handling logic so that if both timestamps begin at 00:00, the end date is automatically shifted back by one day. I tested this using multiple ICS files and confirmed that the calendar now displays all-day events cleanly as a single day. This PR pushed me to analyze JavaScript code more deeply than I did in Release 0.2, and it helped me better understand how calendar systems handle date boundaries.

Top comments (0)