fix(web): keep event's own date selectable in recurrence "Ends on" picker - #2550
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(web): keep event's own date selectable in recurrence "Ends on" picker#2550posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
…cker Anchor the recurrence "Ends on" picker's minimum date to the event's start date instead of its end. The end-based floor disabled the event's own date for any event running past local midnight (the end lands on the next calendar day, and react-datepicker compares day cells by calendar day), leaving the date the user most naturally picks unselectable. Generated-By: PostHog Code Task-Id: 2f1dc9cd-27d1-450a-9ca7-3fb74c208a29
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
aria-label="Not available …"), a silent dead end with no visible explanation.RecurrenceSectionViewderived the picker'sminDatefrom the event's end. When an event ends at/after local midnight (e.g.23:00–00:30, or anything ending00:00the next day), the end lands on the next calendar day. react-datepicker (v4.25.0) disables day cells by calendar day (differenceInCalendarDays), so the event's own start date — the date the user sees and reaches for — sorts beforeminDateand is disabled.minDateto the event's start date, normalized to a bareYYYY-MM-DD. The recurrence can't stop before its own first occurrence, so the start date is the correct floor. Selecting it still produces a valid recurrence that includes the first occurrence (verified againstCompassEventRRuleexpansion).Note
The inbox report proposed a different mechanism (a timed
minDatekeeping its time of day, disabling the same-day cell). That does not reproduce on the pinned react-datepicker@4.25.0: it compares by calendar day and ignores time-of-day, so a same-day event's date is already selectable. The real trigger is the end date landing on a later calendar day than the start — which matches the report's captured DOM exactly (Not available Monday, August 3rd, 2026, i.e. that user's event ended on Aug 4). The report's suggested date-only normalization would have been a no-op.Simplicity
Automated validation
Not available Monday, August 3rd, 2026); confirmed it fails on the old end-based bound and passes after the fix.CompassEventRRule.all(...)that selecting the start date asUNTILstill yields the first occurrence — no empty-recurrence side effect.Independent review
gh pr list/gh issue listby wording and by path). Note: the report's other signal —GridContextMenuWrapperthrow — is out of scope here and already handled by fix(web): stop throwing when right-clicking an uncached event #2549.Test plan
biome checkclean on the changed files;type-checkclean.Created with PostHog Desktop from this inbox report.