Skip to content

🐛 fix(calendar): Fix schedule widget not showing today's events#120

Merged
trickpatty merged 1 commit intomainfrom
claude/fix-schedule-widget-events-T6JTS
Jan 11, 2026
Merged

🐛 fix(calendar): Fix schedule widget not showing today's events#120
trickpatty merged 1 commit intomainfrom
claude/fix-schedule-widget-events-T6JTS

Conversation

@trickpatty
Copy link
Owner

Fixed two issues preventing events from appearing in the Today's Schedule widget:

  1. Timezone mismatch for all-day events: The API query used UTC timestamps
    from toISOString(), but the backend extracted date strings from these
    UTC values. For users in UTC+ timezones (Australia, Asia, Europe),
    their local midnight would appear as the previous UTC day, causing
    all-day events to not match the query.

    Fix: Expand fetchEventsForToday() query range by 1 day on each side
    to ensure all-day events are captured regardless of timezone. The
    todayEvents computed signal handles proper client-side filtering.

  2. Incorrect endDate comparison for all-day events: The filter used
    todayStr <= endDate, but endDate is exclusive (iCal format - an event
    ending Jan 11 has endDate="2026-01-12"). This caused events to appear
    on the day after they should have ended.

    Fix: Use todayStr < endDate for events with explicit endDate, and
    exact match (startDate === todayStr) for single-day events without
    endDate.

Also fixed isEventNow() and isEventPast() methods for consistent
handling of single-day all-day events without explicit endDate.

Fixed two issues preventing events from appearing in the Today's Schedule widget:

1. Timezone mismatch for all-day events: The API query used UTC timestamps
   from toISOString(), but the backend extracted date strings from these
   UTC values. For users in UTC+ timezones (Australia, Asia, Europe),
   their local midnight would appear as the previous UTC day, causing
   all-day events to not match the query.

   Fix: Expand fetchEventsForToday() query range by 1 day on each side
   to ensure all-day events are captured regardless of timezone. The
   todayEvents computed signal handles proper client-side filtering.

2. Incorrect endDate comparison for all-day events: The filter used
   todayStr <= endDate, but endDate is exclusive (iCal format - an event
   ending Jan 11 has endDate="2026-01-12"). This caused events to appear
   on the day after they should have ended.

   Fix: Use todayStr < endDate for events with explicit endDate, and
   exact match (startDate === todayStr) for single-day events without
   endDate.

Also fixed isEventNow() and isEventPast() methods for consistent
handling of single-day all-day events without explicit endDate.
@trickpatty trickpatty merged commit 1e3fc46 into main Jan 11, 2026
16 checks passed
@trickpatty trickpatty deleted the claude/fix-schedule-widget-events-T6JTS branch January 11, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants