Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
87dad32
feat!: remove deprecated public APIs for v10
gpbl Feb 6, 2026
d5ff60b
fix(website): restore v10 docs build
gpbl Feb 6, 2026
f38762c
fix(website): fix playground query parser typing
gpbl Feb 6, 2026
bdfc0cd
Merge branch 'main' into v10-remove-deprecated-apis
gpbl Feb 6, 2026
f1fc0a5
Merge remote-tracking branch 'origin/main' into v10-remove-deprecated…
gpbl Feb 10, 2026
900bc5f
feat!: default navLayout to after
gpbl Feb 10, 2026
671f306
Merge branch 'main' into v10-remove-deprecated-apis
gpbl Feb 11, 2026
66af073
Merge remote-tracking branch 'origin/main' into v10-remove-deprecated…
gpbl Feb 28, 2026
74aa2b4
fix(hijri): use start/endMonth bounds in v10 branch
gpbl Feb 28, 2026
399d2d3
Merge branch 'main' into v10-remove-deprecated-apis
gpbl Apr 14, 2026
79594ef
Merge branch 'main' into v10-remove-deprecated-apis
gpbl Apr 14, 2026
fb238c7
Fix playground legacy month bound params
gpbl Apr 14, 2026
86f54b7
Update custom components guide for v10
gpbl Apr 14, 2026
51e9072
Replace week number docs with v10 example
gpbl Apr 14, 2026
8aa7eac
Prepare v10 prerelease publish (#2918)
gpbl Apr 16, 2026
1cc6fdc
Merge branch 'main' into v10-remove-deprecated-apis
gpbl Apr 16, 2026
f6eefad
Move v10 docs changes to next docs
gpbl Apr 16, 2026
448adb5
Fix upgrading docs API link
gpbl Apr 16, 2026
ba7a885
Load next docs examples from package examples
gpbl Apr 16, 2026
642db38
Label default docs as stable v9
gpbl Apr 16, 2026
64d90d7
Pin stable docs examples to v9 runtime
gpbl Apr 16, 2026
72502ed
Pin stable API docs to v9 snapshot
gpbl Apr 16, 2026
e96d170
Detect stable docs version from v9 alias
gpbl Apr 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
required: false
default: false
type: boolean
npm_tag:
description: npm dist-tag to publish under
required: false
default: latest
type: string

permissions:
id-token: write # Required for OIDC
Expand Down Expand Up @@ -113,4 +118,4 @@ jobs:
with:
name: rdp-dist
path: dist
- run: npm publish --provenance --tag latest
- run: npm publish --provenance --tag ${{ github.event.inputs.npm_tag || 'latest' }}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

DayPicker follows [Semantic Versioning](http://semver.org/). See the [Releases page](https://github.com/gpbl/react-day-picker/releases) on Github for the complete list of changes, diffs and contributors, or the [list of versions](https://www.npmjs.com/package/react-day-picker?activeTab=versions) published on npm.

## v10.0.0

_Release date: 2026-02-06_

DayPicker v10 removes all previously deprecated public APIs from v9.

#### Breaking Changes

- remove deprecated props: `fromDate`, `toDate`, `fromMonth`, `toMonth`, `fromYear`, `toYear`, `initialFocus`
- remove deprecated event props: `onWeekNumberClick`, `onDayKeyUp`, `onDayKeyPress`, `onDayPointerEnter`, `onDayPointerLeave`, `onDayTouchCancel`, `onDayTouchEnd`, `onDayTouchMove`, `onDayTouchStart`
- remove deprecated type exports from `types/deprecated`
- remove deprecated aliases: `formatMonthCaption`, `formatYearCaption`, `labelDay`, `labelCaption`, `isMatch`, `isDateInRange`
- remove deprecated `components.Button` customization entry
- remove deprecated `DeprecatedUI` compatibility typing for `classNames` and `styles`
- remove deprecated DateLib exports: `FormatOptions`, `LabelOptions`, `dateLib`, and `DateLib.Date`
- remove deprecated `react-day-picker/jalali` subpath (use `react-day-picker/persian`)
## v9.14.0

_Release date: 2026-02-26_
Expand Down
6 changes: 3 additions & 3 deletions examples/Formatters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const formatCaption = (month: Date, options: DateLibOptions | undefined) => {
export function Formatters() {
return (
<DayPicker
fromYear={2020}
toYear={2025}
formatters={{ formatMonthCaption: formatCaption }}
startMonth={new Date(2020, 0)}
endMonth={new Date(2025, 11)}
formatters={{ formatCaption }}
/>
);
}
4 changes: 2 additions & 2 deletions examples/FromToMonth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function FromToMonth() {
return (
<DayPicker
defaultMonth={defaultMonth}
fromMonth={defaultMonth}
toMonth={new Date(2015, 10, 20)}
startMonth={defaultMonth}
endMonth={new Date(2015, 10, 20)}
/>
);
}
6 changes: 5 additions & 1 deletion examples/FromToYear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { DayPicker } from "react-day-picker";

export function FromToYear() {
return (
<DayPicker defaultMonth={new Date(2024, 0)} fromYear={2024} toYear={2026} />
<DayPicker
defaultMonth={new Date(2024, 0)}
startMonth={new Date(2024, 0)}
endMonth={new Date(2026, 11)}
/>
);
}
10 changes: 2 additions & 8 deletions examples/InputRange.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { format, isAfter, isBefore, isValid, parse } from "date-fns";
import React, { type ChangeEventHandler, useState } from "react";
import {
type DateRange,
DayPicker,
type SelectRangeEventHandler,
} from "react-day-picker";
import { type DateRange, DayPicker, type PropsRange } from "react-day-picker";

export function InputRange() {
const [selectedRange, setSelectedRange] = useState<DateRange>();
Expand Down Expand Up @@ -38,9 +34,7 @@ export function InputRange() {
}
};

const handleRangeSelect: SelectRangeEventHandler = (
range: DateRange | undefined,
) => {
const handleRangeSelect: PropsRange["onSelect"] = (range) => {
setSelectedRange(range);
if (range?.from) {
setFromValue(format(range.from, "y-MM-dd"));
Expand Down
7 changes: 5 additions & 2 deletions examples/ModifiersCustom.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { type DayMouseEventHandler, DayPicker } from "react-day-picker";
import { type DayEventHandler, DayPicker } from "react-day-picker";

const bookedDays = [
new Date(2024, 5, 8),
Expand All @@ -27,7 +27,10 @@ const css = `
}`;

export function ModifiersCustom() {
const handleDayClick: DayMouseEventHandler = (day, { booked }) => {
const handleDayClick: DayEventHandler<React.MouseEvent> = (
day,
{ booked },
) => {
alert(`Day ${day.toLocaleDateString()} is booked? ${booked}`);
};

Expand Down
4 changes: 2 additions & 2 deletions examples/ModifiersSelected.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { subDays } from "date-fns";
import React from "react";
import { DayPicker, type SelectSingleEventHandler } from "react-day-picker";
import { DayPicker, type PropsSingle } from "react-day-picker";

export function ModifiersSelected() {
const yesterday = subDays(new Date(), 1);
const handleSelect: SelectSingleEventHandler = (_value, _date, modifiers) => {
const handleSelect: PropsSingle["onSelect"] = (_value, _date, modifiers) => {
if (modifiers.selected) {
alert("You clicked a selected day.");
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Testcase1567.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function TestCase1567() {
numberOfMonths={2}
showOutsideDays
selected={selected}
fromMonth={new Date(2020, 5)}
startMonth={new Date(2020, 5)}
/>
<button type="button">I should be focusable</button>
</div>
Expand Down
8 changes: 4 additions & 4 deletions examples/TimeZoneNoonSafe.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ describe("TimeZoneNoonSafe navigation", () => {
});
});

test("year dropdown starts at the fromMonth year", () => {
test("year dropdown starts at the startMonth year", () => {
const timeZone = "Asia/Dubai";
const fromMonth = new Date(1880, 0, 1);
const startMonth = new Date(1880, 0, 1);
render(
<TimeZoneNoonSafe
captionLayout="dropdown"
timeZone={timeZone}
fromMonth={fromMonth}
toMonth={new Date(1885, 11, 31)}
startMonth={startMonth}
endMonth={new Date(1885, 11, 31)}
/>,
);
const selectYear = screen.getAllByRole("combobox")[1];
Expand Down
6 changes: 3 additions & 3 deletions examples/TimeZoneNoonSafe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import React, { useState } from "react";
import {
DayPicker,
type DayPickerProps,
type PropsBase,
type PropsSingle,
TZDate,
} from "react-day-picker";

type TimeZoneNoonSafeProps = Partial<DayPickerProps> & {
type TimeZoneNoonSafeProps = Omit<PropsBase, "mode"> & {
selected?: Date;
onSelect?: PropsSingle["onSelect"];
};
Expand All @@ -21,7 +22,6 @@ export function TimeZoneNoonSafe(props: TimeZoneNoonSafeProps = {}) {
defaultMonth,
startMonth,
footer,
mode: _mode,
...rest
} = props;

Expand Down Expand Up @@ -51,7 +51,7 @@ export function TimeZoneNoonSafe(props: TimeZoneNoonSafeProps = {}) {
selected={selectedValue}
onSelect={onSelect}
startMonth={startMonth ?? new Date(1880, 0, 1)}
toYear={2025}
endMonth={new Date(2025, 11, 31)}
footer={
footer ??
(selected
Expand Down
150 changes: 76 additions & 74 deletions examples/__snapshots__/Range.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,13 @@ exports[`should match the snapshot 1`] = `
<div
class="rdp-root"
data-mode="range"
data-nav-layout="after"
id="test"
lang="en-US"
>
<div
class="rdp-months"
>
<nav
aria-label="Navigation bar"
class="rdp-nav"
>
<button
aria-label="Go to the Previous Month"
class="rdp-button_previous"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"
/>
</svg>
</button>
<button
aria-label="Go to the Next Month"
class="rdp-button_next"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"
/>
</svg>
</button>
</nav>
<div
class="rdp-month"
>
Expand All @@ -63,6 +27,43 @@ exports[`should match the snapshot 1`] = `
June 2020
</span>
</div>
<nav
aria-label="Navigation bar"
class="rdp-nav"
>
<button
aria-label="Go to the Previous Month"
class="rdp-button_previous"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"
/>
</svg>
</button>
<button
aria-label="Go to the Next Month"
class="rdp-button_next"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"
/>
</svg>
</button>
</nav>
<table
aria-label="June 2020"
aria-multiselectable="true"
Expand Down Expand Up @@ -646,49 +647,13 @@ exports[`when a day in the range is clicked when the day is clicked again when a
<div
class="rdp-root"
data-mode="range"
data-nav-layout="after"
id="test"
lang="en-US"
>
<div
class="rdp-months"
>
<nav
aria-label="Navigation bar"
class="rdp-nav"
>
<button
aria-label="Go to the Previous Month"
class="rdp-button_previous"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"
/>
</svg>
</button>
<button
aria-label="Go to the Next Month"
class="rdp-button_next"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"
/>
</svg>
</button>
</nav>
<div
class="rdp-month"
>
Expand All @@ -703,6 +668,43 @@ exports[`when a day in the range is clicked when the day is clicked again when a
June 2020
</span>
</div>
<nav
aria-label="Navigation bar"
class="rdp-nav"
>
<button
aria-label="Go to the Previous Month"
class="rdp-button_previous"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"
/>
</svg>
</button>
<button
aria-label="Go to the Next Month"
class="rdp-button_next"
type="button"
>
<svg
class="rdp-chevron"
height="24"
viewBox="0 0 24 24"
width="24"
>
<polygon
points="8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"
/>
</svg>
</button>
</nav>
<table
aria-label="June 2020"
aria-multiselectable="true"
Expand Down
Loading
Loading