import { ExtractPublicPropTypes, PropType } from 'vue'; import { PopupPositionT, PopupTriggerT } from '../popup'; import { DisabledHoursFn, DisabledMinutesFn, DisabledSecondsFn } from '../time-picker'; export type { DisabledHoursFn, DisabledMinutesFn, DisabledSecondsFn }; export type DatePickerMode = 'datetime' | 'date' | 'month' | 'year'; export type DisabledDateFn = (opts: { date: Date; year: number; /** 0-indexed,0=一月,11=十二月 */ month: number; day: number; }) => boolean; export type DisabledMonthFn = (opts: { date: Date; year: number; /** 0-indexed,0=一月,11=十二月 */ month: number; }) => boolean; export type DisabledYearFn = (opts: { date: Date; year: number; }) => boolean; export type DateModelValue = Date | string | number | undefined | null; export type DatePickerShortcutSlotProps = { setValue: (value?: number) => void; emitChange: () => void; }; export type DatePickerRangeShortcutSlotProps = { setValue: (start?: number, end?: number) => void; emitChange: () => void; }; export declare const basePickerProps: { placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const popupPickerProps: { /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; }; export declare const dateConstraintProps: { /** * @zh-CN 禁用日期的判断函数 * @en-US Function to specify the dates that cannot be selected. */ disabledDate: { type: PropType; default: undefined; }; /** * @zh-CN 禁用月份的判断函数,month 为 0-indexed(0=一月,11=十二月) * @en-US Function to specify the months that cannot be selected. month is 0-indexed (0=January, 11=December). */ disabledMonth: { type: PropType; default: undefined; }; /** * @zh-CN 禁用年份的判断函数 * @en-US Function to specify the years that cannot be selected. */ disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 最小可选日期(Date、格式字符串或时间戳) * @en-US Minimum selectable date (Date object, formatted string or timestamp). */ minDate: { type: PropType; default: undefined; }; /** * @zh-CN 最大可选日期(Date、格式字符串或时间戳) * @en-US Maximum selectable date (Date object, formatted string or timestamp). */ maxDate: { type: PropType; default: undefined; }; /** * @zh-CN 每周起始日,0=周日,1=周一,...,6=周六 * @en-US Day start of week. 0=Sunday, 1=Monday, ..., 6=Saturday. * @default 1 */ dayStartOfWeek: { type: NumberConstructor; default: number; }; }; export declare const timeConstraintProps: { hourStep: { type: NumberConstructor; default: number; }; minuteStep: { type: NumberConstructor; default: number; }; secondStep: { type: NumberConstructor; default: number; }; disabledHours: { type: PropType; default: undefined; }; disabledMinutes: { type: PropType; default: undefined; }; disabledSeconds: { type: PropType; default: undefined; }; minTime: { type: StringConstructor; default: undefined; }; maxTime: { type: StringConstructor; default: undefined; }; }; export declare const yearPickerProps: { format: { type: StringConstructor; default: string; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 当返回值只有年、月份或日期时,补全细节时间戳的默认值 * @en-US When the return value only contains year, month, or date, populate the timestamp with default values for the missing time components. */ defaultValue: { type: PropType; default: () => Date; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const monthPickerProps: { format: { type: StringConstructor; default: string; }; disabledMonth: { type: PropType; default: undefined; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 当返回值只有年、月份或日期时,补全细节时间戳的默认值 * @en-US When the return value only contains year, month, or date, populate the timestamp with default values for the missing time components. */ defaultValue: { type: PropType; default: () => Date; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const datePickerProps: { format: { type: StringConstructor; default: string; }; disabledDate: { type: PropType; default: undefined; }; minDate: { type: PropType; default: undefined; }; maxDate: { type: PropType; default: undefined; }; dayStartOfWeek: { type: NumberConstructor; default: number; }; disabledMonth: { type: PropType; default: undefined; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 当返回值只有年、月份或日期时,补全细节时间戳的默认值 * @en-US When the return value only contains year, month, or date, populate the timestamp with default values for the missing time components. */ defaultValue: { type: PropType; default: () => Date; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const dateTimePickerProps: { format: { type: StringConstructor; default: string; }; hourStep: { type: NumberConstructor; default: number; }; minuteStep: { type: NumberConstructor; default: number; }; secondStep: { type: NumberConstructor; default: number; }; disabledHours: { type: PropType; default: undefined; }; disabledMinutes: { type: PropType; default: undefined; }; disabledSeconds: { type: PropType; default: undefined; }; minTime: { type: StringConstructor; default: undefined; }; maxTime: { type: StringConstructor; default: undefined; }; disabledDate: { type: PropType; default: undefined; }; minDate: { type: PropType; default: undefined; }; maxDate: { type: PropType; default: undefined; }; dayStartOfWeek: { type: NumberConstructor; default: number; }; disabledMonth: { type: PropType; default: undefined; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 当返回值只有年、月份或日期时,补全细节时间戳的默认值 * @en-US When the return value only contains year, month, or date, populate the timestamp with default values for the missing time components. */ defaultValue: { type: PropType; default: () => Date; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const yearRangePickerProps: { /** * @zh-CN 开始日期占位文本 * @en-US Placeholder for start date input. */ placeholderStart: { type: StringConstructor; default: undefined; }; /** * @zh-CN 结束日期占位文本 * @en-US Placeholder for end date input. */ placeholderEnd: { type: StringConstructor; default: undefined; }; defaultValue: { type: PropType; default: () => Date[]; }; format: { type: StringConstructor; default: string; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const monthRangePickerProps: { /** * @zh-CN 开始日期占位文本 * @en-US Placeholder for start date input. */ placeholderStart: { type: StringConstructor; default: undefined; }; /** * @zh-CN 结束日期占位文本 * @en-US Placeholder for end date input. */ placeholderEnd: { type: StringConstructor; default: undefined; }; defaultValue: { type: PropType; default: () => Date[]; }; format: { type: StringConstructor; default: string; }; disabledMonth: { type: PropType; default: undefined; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const dateRangePickerProps: { /** * @zh-CN 开始日期占位文本 * @en-US Placeholder for start date input. */ placeholderStart: { type: StringConstructor; default: undefined; }; /** * @zh-CN 结束日期占位文本 * @en-US Placeholder for end date input. */ placeholderEnd: { type: StringConstructor; default: undefined; }; /** * @zh-CN 当返回值只有年、月份或日期时,补全细节时间戳的默认值 * @en-US When the return value only contains year, month, or date, populate the timestamp with default values for the missing time components. */ defaultValue: { type: PropType; default: () => Date[]; }; format: { type: StringConstructor; default: string; }; disabledDate: { type: PropType; default: undefined; }; minDate: { type: PropType; default: undefined; }; maxDate: { type: PropType; default: undefined; }; dayStartOfWeek: { type: NumberConstructor; default: number; }; disabledMonth: { type: PropType; default: undefined; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export declare const dateTimeRangePickerProps: { format: { type: StringConstructor; default: string; }; /** * @zh-CN 开始日期占位文本 * @en-US Placeholder for start date input. */ placeholderStart: { type: StringConstructor; default: undefined; }; /** * @zh-CN 结束日期占位文本 * @en-US Placeholder for end date input. */ placeholderEnd: { type: StringConstructor; default: undefined; }; defaultValue: { type: PropType; default: () => Date[]; }; hourStep: { type: NumberConstructor; default: number; }; minuteStep: { type: NumberConstructor; default: number; }; secondStep: { type: NumberConstructor; default: number; }; disabledHours: { type: PropType; default: undefined; }; disabledMinutes: { type: PropType; default: undefined; }; disabledSeconds: { type: PropType; default: undefined; }; minTime: { type: StringConstructor; default: undefined; }; maxTime: { type: StringConstructor; default: undefined; }; disabledDate: { type: PropType; default: undefined; }; minDate: { type: PropType; default: undefined; }; maxDate: { type: PropType; default: undefined; }; dayStartOfWeek: { type: NumberConstructor; default: number; }; disabledMonth: { type: PropType; default: undefined; }; disabledYear: { type: PropType; default: undefined; }; /** * @zh-CN 绑定值日期格式,支持dayjs的format允许的值, 'x' 代表时间戳 * @en-US Bound Date format. Support valid dayjs format param. 'x' as timestamp */ valueFormat: { type: StringConstructor; default: string; }; /** * @zh-CN 支持快速清除 * @en-US Support quick clearing. */ clearable: { type: BooleanConstructor; }; /** * @zh-CN 选项触发方式 * @en-US Option trigger method. * @default 'click' */ trigger: { type: PropType; default: string; }; /** * @zh-CN 弹出框位置 * @en-US Popup position. * @default 'bl' */ popupPosition: { type: PropType; default: string; }; /** * @zh-CN 弹出框挂载容器 * @en-US Popup wrapper. * @default 'body' */ popupWrapper: { type: PropType; default: string; }; /** * @zh-CN 是否在结束选择时,卸载所有选项 * @en-US Whether to unmount all options when ending the selection. * @default true */ unmountOnHide: { type: BooleanConstructor; default: boolean; }; /** * @zh-CN 过渡名称 * @en-US Transition name. */ transition: { type: StringConstructor; }; placeholder: { type: StringConstructor; }; inputId: { type: StringConstructor; }; disabled: { type: BooleanConstructor; }; readonly: { type: BooleanConstructor; }; size: { type: PropType; }; round: { type: PropType; }; color: { type: PropType; default: string; }; variant: { type: PropType; default: string; }; noResponsive: { type: BooleanConstructor; }; optionTitle: { type: StringConstructor; }; }; export type YearPickerPropsT = ExtractPublicPropTypes; export type MonthPickerPropsT = ExtractPublicPropTypes; export type DatePickerPropsT = ExtractPublicPropTypes; export type DateTimePickerPropsT = ExtractPublicPropTypes; export type YearRangePickerPropsT = ExtractPublicPropTypes; export type MonthRangePickerPropsT = ExtractPublicPropTypes; export type DateRangePickerPropsT = ExtractPublicPropTypes; export type DateTimeRangePickerPropsT = ExtractPublicPropTypes;