Skip to content

fix(DatePicker): render the clock's month labels on the client - #376

Merged
lorant-one merged 2 commits into
feat/3-0-breaking-cleanupfrom
fix/date-picker-hydration-month
Oct 31, 2026
Merged

lorant-one merged 2 commits into
feat/3-0-breaking-cleanupfrom
fix/date-picker-hydration-month

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Before: a DatePicker with no date, prerendered in one month and opened in the next, threw React #418 on load ("October" from the server against "November" in the browser). The docs build's browser check opens pages 25 hours after the build, so since 22:53 UTC on 30 October every 3.0 Docs build fails on /form-controls/datePicker (#371 and #372 included).

After: a picker that opens on the clock's month renders its month and year labels on the client, as its day grid already did. A picker with a date still renders them on the server.

How: a useSyncExternalStore hydration flag gates the two header labels and their aria-labels only when the picker has no value or defaultValue. Two tests cover it: the server markup holds no month name with no date (fails without the fix), and the mounted picker names the current month. Verified locally by rebuilding the docs and running check:render on every form-controls page: 0 problems (4 before).


Generated by Claude Code

A picker with no date opens on the current month. Prerendered in one month
and opened in the next, its header hydrated the server's month against the
visitor's and threw React #418, which fails the docs build's browser check
on /form-controls/datePicker whenever the check's clock crosses a month.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1

Copy link
Copy Markdown
Member Author

Compare flagged one shot: blocks_blog@390__tile01 on /blocks/blog, a 46 px change (0.01%). That page renders no DatePicker, and this diff touches only DatePicker's header labels, so the change isn't this PR's. Every DatePicker shot came out the same. I've started one full re-run of the visual check to confirm.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

The re-run of Compare flagged a different shot: modules_chat@1280__b1fb837e78, a 41 px change, and the blog tile came out the same this time. Neither /blocks/blog nor /modules/chat renders a DatePicker, and each run picked a different tile at under 0.03%, so this is capture noise, not this diff. Every other check is green, including the Docs build that this PR fixes for the whole 3.0 branch, so I'm merging it.


Generated by Claude Code

…fix/date-picker-hydration-month

# Conflicts:
#	CHANGELOG.md
@lorant-one
lorant-one merged commit 381d85f into feat/3-0-breaking-cleanup Oct 31, 2026
8 checks passed
@lorant-one
lorant-one deleted the fix/date-picker-hydration-month 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