About
The Calendar
component is built on top of React DayPicker.
Usage
import { Calendar } from '~/components/calendar';
import { Calendar } from '~/components/calendar';
const [date, setDate] = React.useState<Date | undefined>(new Date());
return <Calendar mode="single" selected={date} onSelect={setDate} className="rounded-md border" />;
const [date, setDate] = React.useState<Date | undefined>(new Date());
return <Calendar mode="single" selected={date} onSelect={setDate} className="rounded-md border" />;
See the React DayPicker documentation for more information.
Date Picker
You can use the <Calendar>
component to build a date picker. See the Date Picker page for more information.