@stanfordspezi/spezi-web-design-system
Version:
Stanford Biodesign Digital Health Spezi Web Design System
38 lines (37 loc) • 916 B
TypeScript
import { DayPickerProps } from 'react-day-picker';
export type CalendarProps = DayPickerProps & {
/**
* Whether to show the time picker below the calendar.
* Only works in single date selection mode.
* When enabled, selected time will be preserved when changing dates.
*
* @default false
*/
showTimePicker?: boolean;
};
/**
* A calendar component for date selection with an optional time picker.
* Built on top of [react-day-picker](https://react-day-picker.js.org/).
*
* @example
* ```tsx
* // Basic usage with single date selection
* <Calendar
* mode="single"
* selected={date}
* onSelect={setDate}
* />
* ```
*
* @example
* ```tsx
* // With time picker
* <Calendar
* mode="single"
* selected={date}
* onSelect={setDate}
* showTimePicker
* />
* ```
*/
export declare const Calendar: (props: CalendarProps) => import("react").JSX.Element;