fix(dashboard): show all-day events correctly in calendar widget#8545
Open
stephan1827 wants to merge 1 commit into
Open
fix(dashboard): show all-day events correctly in calendar widget#8545stephan1827 wants to merge 1 commit into
stephan1827 wants to merge 1 commit into
Conversation
The CalendarWidget compared DTSTART timestamps with the current time, which caused all-day events (VALUE=DATE, stored as midnight UTC) to be excluded once the clock passed midnight — effectively hiding them all day. Additionally, all-day events were displayed with a time span like "in 10 hours" instead of a meaningful label. This fix detects all-day events by checking whether the DTSTART time component is 00:00:00 (standard VALUE=DATE) or 23:59:59 (used by some third-party providers as a compatibility signal). For these events: - Use a date-based comparison instead of a timestamp comparison so that today's all-day events are always shown. - Display "All day" as the subtitle instead of a formatted time span. Signed-off-by: Stephan Stricker <stephan@stricker.cloud> Signed-off-by: stephan1827 <stephan@stricker.cloud>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
The dashboard calendar widget had two bugs with all-day (VALUE=DATE) events:
DTSTART.timestamp >= now, which always fails after midnight UTC, effectively hiding today's all-day events for the entire day.formatTimeSpan(), showing e.g. "in 10 hours" instead of something meaningful.Changes
00:00:00(standardVALUE=DATE) or23:59:59(used by some third-partyICalendarproviders as a forward-compatibility signal).Y-m-d) instead of timestamp, so today's events are always included.Test plan
🤖 Generated with Claude Code