Skip to content

fix(DatePicker): an undated calendar picks this month once mounted (3.0) - #375

Merged
lorant-one merged 1 commit into
feat/3-0-breaking-cleanupfrom
fix/datepicker-month-hydration
Oct 30, 2026
Merged

lorant-one merged 1 commit into
feat/3-0-breaking-cleanupfrom
fix/datepicker-month-hydration

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

Why

Every PR into the 3.0 branch fails "Docs build" right now (#367, #371 and others) with React #418 on /form-controls/datePicker. The docs check visits each page 25 hours after the build, and from 30 October 23:00 UTC that lands in November. A DatePicker with no value read this month from the clock while rendering, so the server drew October and the browser drew November, and hydration failed. Real visitors get the same error whenever the docs, or any app, were prerendered in the month before.

What changes

Without a date, Calendar and the range calendars start on a fixed month, hidden, and move to this month in an effect. A picker given a value, a defaultValue or a controlled month is unchanged.

Checks

  • New datepicker-month-hydration.test.tsx: it prerenders on 31 October 23:50 and hydrates on 1 November 00:20, for a single picker and a two-month range. Both tests fail without the fix and pass with it.
  • Core vitest: 279 files and 3,900 tests pass. Core typecheck is clean.
  • Reproduced locally with check:render on a production docs build (4 × feat(SegmentedControl): slide the selected background between options (3.0) #418); the dev server showed the October/November aria-label mismatch.


Generated by Claude Code

A DatePicker with no value showed this month, read from the clock while
rendering. A page prerendered in one month and opened in the next drew a
different month on the server and in the browser, and hydration failed
(React #418). The docs check visits pages 25 hours after the build, so
every PR's Docs build fails from 30 October 23:00 UTC to the end of the
31st.

Without a date, Calendar and the range calendars start on a fixed month,
hidden, and move to this month in an effect.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
@lorant-one
lorant-one merged commit f70351f into feat/3-0-breaking-cleanup Oct 30, 2026
9 checks passed
lorant-one pushed a commit that referenced this pull request Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq

# Conflicts:
#	CHANGELOG.md
#	packages/core/src/modules/data/interfaces.ts
lorant-one pushed a commit that referenced this pull request Oct 31, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq

# Conflicts:
#	CHANGELOG.md
#	apps/docs/src/content/data/lineChart.mdx
#	packages/core/src/__tests__/legend.interaction.test.tsx
#	packages/core/src/modules/data/BarChart.impl.tsx
#	packages/core/src/modules/data/Legend.tsx
#	packages/core/src/modules/data/LineBarChart.impl.tsx
#	packages/core/src/modules/data/LineChart.impl.tsx
#	packages/core/src/modules/data/PieChart.impl.tsx
@lorant-one
lorant-one deleted the fix/datepicker-month-hydration branch October 31, 2026 21:34
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