UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

31 lines (28 loc) 1.37 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { PropsForTranslation } from '../../localization/useTranslation.mjs'; import { YearMonthPickerProps } from './YearMonthPicker.mjs'; import { DayPickerProps } from './DayPicker.mjs'; import { TimeTranslationType } from '../../localization/defaults/time.mjs'; import '../../localization/util.mjs'; import '../../util/date.mjs'; type DatePickerTranslationType = TimeTranslationType; type DisplayMode = 'yearMonth' | 'day'; type DatePickerProps = { value?: Date; start?: Date; end?: Date; initialDisplay?: DisplayMode; onChange?: (date: Date) => void; dayPickerProps?: Omit<DayPickerProps, 'displayedMonth' | 'onChange' | 'selected'>; yearMonthPickerProps?: Omit<YearMonthPickerProps, 'displayedYearMonth' | 'onChange' | 'start' | 'end'>; className?: string; }; /** * A Component for picking a date */ declare const DatePicker: ({ overwriteTranslation, value, start, end, initialDisplay, onChange, yearMonthPickerProps, dayPickerProps, className }: PropsForTranslation<DatePickerTranslationType, DatePickerProps>) => react_jsx_runtime.JSX.Element; /** * Example for the Date Picker */ declare const DatePickerUncontrolled: ({ value, onChange, ...props }: DatePickerProps) => react_jsx_runtime.JSX.Element; export { DatePicker, type DatePickerProps, DatePickerUncontrolled };