import React from 'react'; import { DatePickerProps } from 'antd'; import 'moment/locale/zh-cn'; import { BasePickerProps, PickerRef } from './interface'; interface FRCDatePickerCustomProps { /** 默认面板日期 */ defaultPickerValue?: moment.Moment; /** 默认日期,如果开始时间或结束时间为 null 或者 undefined,日期范围将是一个开区间 */ defaultValue?: moment.Moment; /** 禁用 */ disabled?: boolean; /** 不可选择的时间 */ disabledTime?: (current: moment.Moment) => object; /** 设置日期格式,为数组时支持多格式匹配,展示以第一个为准。配置参考 moment.js,支持自定义格式 */ format?: string | ((value: moment.Moment) => string) | (string | ((value: moment.Moment) => string))[]; /** 在面板中添加额外的页脚 */ renderExtraFooter?: (mode: any) => React.ReactNode; /** 当设定了 showTime 的时候,面板是否显示“此刻”按钮 */ showNow?: boolean; /** 增加时间选择功能 */ showTime?: Object | boolean; /** 是否展示“今天”按钮 */ showToday?: boolean; /** 日期 */ value?: moment.Moment; /** 时间发生变化的回调 */ onChange?: (value: moment.Moment | null, dateString: string) => void; /** 点击确定按钮的回调 */ onOk?: (value: moment.Moment | null) => void; /** 日期面板变化时的回调 */ onPanelChange?: (value: moment.Moment, mode: string) => void; /** 设置激活状态 */ work?: boolean; } export type FRCDatePickerProps = BasePickerProps & FRCDatePickerCustomProps & DatePickerProps; export declare const DatePicker: React.ForwardRefExoticComponent<((BasePickerProps & FRCDatePickerCustomProps & Omit, "locale" | "generateConfig" | "hideHeader" | "components"> & { locale?: import("antd/lib/date-picker/generatePicker").PickerLocale; size?: import("antd/lib/button").ButtonSize; placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight"; bordered?: boolean; status?: "" | "warning" | "error"; }) | (BasePickerProps & FRCDatePickerCustomProps & Omit, "locale" | "generateConfig" | "hideHeader" | "components"> & { locale?: import("antd/lib/date-picker/generatePicker").PickerLocale; size?: import("antd/lib/button").ButtonSize; placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight"; bordered?: boolean; status?: "" | "warning" | "error"; })) & React.RefAttributes>; export default DatePicker;