import * as React from 'react'; import type { PartialWith } from "../../_util/type"; import type { BaseInfo, DateValue, PanelMode, PickerRef, SharedPickerProps, SharedTimeProps, ValueDate } from '../interface'; export interface BasePickerProps extends PartialWith, 'prefixCls' | 'locale'> { id?: string; /** Not support `time` or `datetime` picker */ multiple?: boolean; removeIcon?: React.ReactNode; /** Only work when `multiple` is in used */ maxTagCount?: number | 'responsive'; value?: DateValue | DateValue[] | null; defaultValue?: DateValue | DateValue[] | null; onChange?: (dateString: string | string[], date: DateType | DateType[] | null) => void; onCalendarChange?: (dateString: string | string[], date: DateType | DateType[], info: BaseInfo) => void; /** */ onOk?: (value?: DateType | DateType[]) => void; placeholder?: string; /** * Config the popup panel date. * Every time active the input to open popup will reset with `defaultPickerValue`. * * Note: `defaultPickerValue` priority is higher than `value` for the first open. */ defaultPickerValue?: DateType | null; /** * Config each start & end field popup panel date. * When config `pickerValue`, you must also provide `onPickerValueChange` to handle changes. */ pickerValue?: DateType | null; /** * Each popup panel `pickerValue` change will trigger the callback. * @param date The changed picker value * @param info.source `panel` from the panel click. `reset` from popup open or field typing. */ onPickerValueChange?: (date: DateType, info: { source: 'reset' | 'panel'; mode: PanelMode; }) => void; presets?: ValueDate[]; disabled?: boolean; mode?: PanelMode; onPanelChange?: (values: DateType, modes: PanelMode) => void; } export interface InternalPickerProps extends BasePickerProps, Omit, 'format' | 'defaultValue'> { } /** Internal usage. For cross function get same aligned props */ export type ReplacedPickerProps = { onChange?: (dateString: string | string[] | null, date: DateType | DateType[] | null) => void; onCalendarChange?: (dateString: string | string[], date: DateType | DateType[], info: BaseInfo) => void; }; declare const RefPicker: (props: InternalPickerProps & React.RefAttributes) => React.ReactElement; export default RefPicker;