UNPKG

reablocks

Version:
47 lines (45 loc) 1.16 kB
import { DateInputTheme } from './DateInputTheme'; import { InputProps } from '../Input'; import { PresetOption } from '../Calendar'; import { Placement } from '../../utils/Position'; import { FC, ReactElement } from 'react'; export type DateInputProps = Omit<InputProps, 'value' | 'onChange'> & { /** * The format in which the date should be displayed. * @type {string} */ format?: string; /** * Calendar placement type. */ placement?: Placement; /** * Open calendar on field focus */ openOnFocus?: boolean; /** * Preset to show in quick filter. */ preset?: PresetOption[]; /** * Custom theme for the date input. */ theme?: DateInputTheme; /** * Name of the option to open the calendar. */ openCalendarOptionName?: string; /** * Icon to show in open calendar button. */ icon?: ReactElement; } & ({ isRange?: true; value: [Date, Date]; onChange: (value: [Date, Date]) => void; } | { isRange?: false; value: Date; onChange: (value: Date) => void; }); export declare const DateInput: FC<DateInputProps>;