UNPKG

507 BTypeScriptView Raw
1import React from "react";
2
3import { DayPicker } from "react-day-picker";
4
5const defaultMonth = new Date(2024, 5);
6const defaultSelected = new Date(2024, 5, 10);
7const disabledDate = new Date(2024, 5, 10);
8
9export function TestCase2047() {
10 const [selected, setSelected] = React.useState<Date>(defaultSelected);
11 return (
12 <DayPicker
13 defaultMonth={defaultMonth}
14 mode="single"
15 required
16 selected={selected}
17 onSelect={setSelected}
18 disabled={disabledDate}
19 />
20 );
21}