chore(deps): react-day-picker 10 (major) - #86
Open
lacymorrow wants to merge 1 commit into
Open
lacymorrow wants to merge 1 commit into
lacymorrow wants to merge 1 commit into
Conversation
react-day-picker 10 removes the APIs deprecated in v9: the pre-v9 navigation and focus props (fromMonth/toMonth/fromDate/toDate/initialFocus, ...), aliases, components.Button, and the DeprecatedUI compatibility typing for classNames. src/components/ui/calendar.tsx was still the pre-v9 shadcn component (caption, nav_button, head_row, cell, day_selected, IconLeft/IconRight). v9 only accepted those keys through the compatibility typing and ignored them at runtime, so the calendar has been rendering with default day-picker classes. It is now written against the v9/v10 API (month_caption, button_previous/next, weekdays, weekday, week, day, day_button, range_start/end/middle, selected, today, outside, disabled, hidden, components.Chevron) with the same Tailwind classes. src/components/ui/date-range-picker.tsx: initialFocus -> autoFocus. Both files are tsc-excluded (src/components/ui/**); type-checked in isolation against 10.0.1 and clean. A jsdom render confirms the nav buttons, chevrons, caption, weekday and day cells pick up the classes. Neither file is on a route, so a visual check is still recommended. Claude-Session: https://claude.ai/code/session_01KLWmWU1KLE2diUH14ryqv1
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
One sentence
Major bump of
react-day-pickerfrom 9 to 10 withcalendar.tsxrewritten to the current API (left open for review because it is a major with source changes that deserve a visual check).Bumps
Breaking changes and what changed
Source: https://github.com/gpbl/react-day-picker/releases/tag/v10.0.0 and https://daypicker.dev/upgrading
fromMonth/toMonth/fromDate/toDate/fromYear/toYear,initialFocus,onDay*touch/pointer handlers,onWeekNumberClick), the deprecated aliases (formatMonthCaption,labelDay, ...),components.Button, and theDeprecatedUIcompatibility typing forclassNames/styles. Non-Gregorian calendars move to@daypicker/*packages. Thereact-day-pickerpackage name is still published.src/components/ui/calendar.tsxwas still the pre-v9 shadcn component: it passedcaption,nav_button,nav_button_previous/next,head_row,head_cell,row,cell,day,day_selected,day_today,day_outside,day_disabled,day_range_*,day_hiddenandcomponents={{ IconLeft, IconRight }}. On v9 those keys only type-checked throughDeprecatedUIand were ignored at runtime (the calendar has been rendering with defaultrdp-*classes). It is rewritten against the v9/v10 API:month_caption,button_previous/button_next,month_grid,weekdays/weekday,week,day,day_button,range_start/range_end/range_middle,selected,today,outside,disabled,hidden, andcomponents.Chevron(which mapsorientationto the Radix chevron icons). The Tailwind classes are the same as before, so the look should match the original shadcn calendar.src/components/ui/date-range-picker.tsx:initialFocus(removed) ->autoFocus.Both files live under
src/components/ui/**, whichtsconfig.jsonexcludes, so they were type-checked in isolation against 10.0.1 and are clean. A throwaway jsdom render (not committed) confirmed the nav buttons carryabsolute left-1/right-1, the chevronsh-4 w-4, and the caption/weekday/day cells the expected classes. Neither component is rendered by a route, so please eyeball it in a page or story before merging.Verification
pnpm typecheckcleanpnpm test: 4 files, 16 tests greenpnpm exec vitest run --config vitest.config.node.ts: 3 files, 21 tests greenpnpm buildpassesnext startsmoke:/200,/changelog200,/changelog/nope-xyz404,/faq200,/nope-404404Installed with
--ignore-scripts(isolated-vm postinstall fails under Node 26 locally; matches how Vercel builds).https://claude.ai/code/session_01KLWmWU1KLE2diUH14ryqv1