🐛 fix(calendar): Fix schedule widget not showing today's events#120
Merged
trickpatty merged 1 commit intomainfrom Jan 11, 2026
Merged
🐛 fix(calendar): Fix schedule widget not showing today's events#120trickpatty merged 1 commit intomainfrom
trickpatty merged 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed two issues preventing events from appearing in the Today's Schedule widget:
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.
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.