UNPKG

439 BTypeScriptView Raw
1import React, { useState } from "react";
2
3import {
4 DayPicker,
5 type DayPickerProps,
6 type PropsSingle
7} from "react-day-picker";
8
9export function Keyboard(props: DayPickerProps & PropsSingle) {
10 const [selected, setSelected] = useState<Date | undefined>(undefined);
11 return (
12 <DayPicker
13 {...props}
14 selected={selected}
15 onSelect={setSelected}
16 mode="single"
17 today={new Date(2022, 5, 10)}
18 />
19 );
20}