1 | import React from "react";
|
2 |
|
3 | import { DayPicker } from "react-day-picker";
|
4 |
|
5 | /** Test for the next focus day to not cause an infinite recursion. */
|
6 | export function FocusRecursive() {
|
7 | const disabledDays = [
|
8 | new Date(2022, 5, 4),
|
9 | {
|
10 | after: new Date(2022, 5, 26)
|
11 | }
|
12 | ];
|
13 |
|
14 | return (
|
15 | <DayPicker
|
16 | today={new Date(2022, 5, 1)}
|
17 | defaultMonth={new Date(2022, 5)}
|
18 | disabled={disabledDays}
|
19 | mode="single"
|
20 | />
|
21 | );
|
22 | }
|