Skip to content

feat!: remove deprecated public APIs for v10#2894

Closed
gpbl wants to merge 23 commits intomainfrom
v10-remove-deprecated-apis
Closed

feat!: remove deprecated public APIs for v10#2894
gpbl wants to merge 23 commits intomainfrom
v10-remove-deprecated-apis

Conversation

@gpbl
Copy link
Copy Markdown
Owner

@gpbl gpbl commented Feb 6, 2026

Summary

This PR ships the v10 API cleanup by removing all public APIs that were deprecated in v9, and aligns runtime/docs behavior with the new defaults.

What Changed

  • Removed deprecated navigation/date boundary props from DayPickerProps:
    • fromDate, toDate, fromMonth, toMonth, fromYear, toYear
  • Removed deprecated event/focus props:
    • initialFocus, onWeekNumberClick, onDayKeyUp, onDayKeyPress, onDayPointerEnter, onDayPointerLeave, onDayTouchCancel, onDayTouchEnd, onDayTouchMove, onDayTouchStart
  • Removed deprecated custom-components entry:
    • components.Button
    • NextMonthButton/PreviousMonthButton now render native buttons directly
  • Removed deprecated formatter/label/utility aliases:
    • formatMonthCaption, formatYearCaption
    • labelDay, labelCaption
    • isMatch, isDateInRange
  • Removed deprecated compatibility typing:
    • DeprecatedUI support from classNames/styles
    • removed src/types/deprecated.ts and its export from types/index
  • Removed deprecated DateLib exports:
    • FormatOptions, LabelOptions, dateLib, and DateLib.Date
  • Removed deprecated Jalali subpath export:
    • react-day-picker/jalali and top-level jalali.js/jalali.d.ts
    • users should import from react-day-picker/persian
  • Updated navigation behavior:
    • navLayout now defaults to "after" in DayPicker
  • Updated docs/website/examples/playground/changelog to reflect the v10 API surface and migration path.

Breaking Changes

Yes, this PR introduces breaking changes and is intended for a major release (v10.0.0).

Migration Notes

  • Replace from*/to* props with startMonth/endMonth and hidden matchers.
  • Replace initialFocus with autoFocus.
  • Replace onWeekNumberClick with a custom WeekNumber component.
  • Replace removed day event props with a custom DayButton component.
  • Replace formatter/label/utility aliases with their v9 replacements:
    • formatCaption, formatYearDropdown, labelDayButton, labelGrid, dateMatchModifiers, rangeIncludesDate
  • Replace react-day-picker/jalali imports with react-day-picker/persian.
  • If you relied on implicit nav layout behavior, set navLayout explicitly ("after" or "around") as needed.
  • shadcn/ui compatibility:
    • shadcn/ui's Calendar is copied into each app, so compatibility depends on the local calendar.tsx version.
    • Newer templates that already use DayPicker v9+ APIs (for example Chevron, button_previous, button_next, day_button, month_grid) are expected to work with v10.
    • Older copied calendar.tsx files may still use removed deprecated props or class keys and require manual updates during migration.

@gpbl gpbl marked this pull request as ready for review February 11, 2026 11:43
gpbl added 2 commits February 28, 2026 12:09
…-apis

# Conflicts:
#	CHANGELOG.md
#	examples/__snapshots__/StylingCssModules.test.tsx.snap
#	package.json
@gpbl gpbl closed this Apr 18, 2026
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.

1 participant