1 | import React, { useState } from "react";
|
2 |
|
3 | import { DateRange, DayPicker } from "react-day-picker";
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export function TestCase1567() {
|
11 | const [selected, setSelected] = useState<DateRange | undefined>({
|
12 | from: new Date(2022, 8, 25),
|
13 | to: new Date(2022, 9, 1)
|
14 | });
|
15 |
|
16 | const handleChange = (range: DateRange | undefined) => {
|
17 | range && setSelected(range);
|
18 | };
|
19 | return (
|
20 | <div className="App">
|
21 | <DayPicker
|
22 | mode="range"
|
23 | onSelect={handleChange}
|
24 | numberOfMonths={2}
|
25 | showOutsideDays
|
26 | selected={selected}
|
27 | fromMonth={new Date(2020, 5)}
|
28 | />
|
29 | <button>I should be focusable</button>
|
30 | </div>
|
31 | );
|
32 | }
|