import * as React from "react"; import YearNumber from "./YearNumber"; import MonthNumber from "./MonthNumber"; import WeekNumber from "./WeekNumber"; import DateShortCut from "./DateShortCut"; import { ConfigConsumerProps } from "../Config"; interface IDatePickerProps { /** * 默认日期 * * @default new Date() **/ defaultDate?: string | Date; /** * 最大日期 * * @default 2099 **/ maxDate?: string | Date; /** * 最小日期 * * @default 1900 **/ minDate?: string | Date; /** * 是否展示日期选择panel * * @default false **/ open?: boolean; /** * 不可选择的日期 * * @default function(data)=>boolean **/ disabledDate?: (data: any) => boolean; /** * 变更回调函数 * * @default function(data)=>void **/ onChange?: (d: any, type: any, e: any, inputValue: any) => void; /** * 是否显示今天 * * @default true **/ showToday?: boolean; /** * 日期快捷导航子组件 * * @default WeekNumber **/ subweekElement?: React.ReactNode; /** * 年快捷导航子组件 * * @default WeekNumber **/ subyearElement?: React.ReactNode; /** * 快捷导航子组件 * * @default WeekNumber **/ subheadnavElement?: React.ReactNode; /** * 月份快捷导航子组件 * * @default WeekNumber **/ submonthElement?: React.ReactNode; /** * 自定义底部导航 * * @default null **/ footerElement?: React.ReactNode; /** * 月份显示长文案 * * @default **/ monthLongTexts?: string[]; /** * 月份显示短文案 * * @default **/ monthShortTexts?: string[]; /** * 日期显示长文案 * * @default **/ weekShortTexts?: string[]; /** * 日期显示端文案 * * @default **/ weekLongTexts?: string[]; /** * 展示的日期格式,配置参考 dayjs * * @default YYYY/MM/DD **/ format?: string; /** * 是否选择范围 * * @default false **/ isSelectRange?: boolean; /** * 默认范围 * * @default [] **/ rangeDate?: Date[]; /** * 是否双日历 * * @default false **/ isDouble?: boolean; /** * range 连接符 * * @default '-' **/ rangeSplitSign?: string; /** * 是否选择时间 * * @default false **/ isTimePick?: boolean; /** * 是否不可用 * * @default false **/ disabled?: boolean; /** * 输入框的placeholder * * @default '' **/ placeholder?: string; /** * 是否显示默认当前时间 * * @default true **/ showDefaultValue?: boolean; /** * 默认前缀 * * @default "lg" **/ prefixCls?: string; } interface IDefaultDatePickerProps extends IDatePickerProps { defaultDate: string | Date; showDefaultValue: boolean; maxDate: string | Date; minDate: string | Date; open: boolean; disabledDate: () => false; onChange: (d: any, type: any, e: any, inputValue: any) => void; showToday: boolean; subweekElement: any; subyearElement: any; subheadnavElement: any; submonthElement: any; footerElement: any; monthLongTexts: string[]; monthShortTexts: string[]; weekShortTexts: string[]; weekLongTexts: string[]; format: string; isSelectRange: boolean; rangeDate: any; isDouble: boolean; rangeSplitSign: string; isTimePick: boolean; disabled: boolean; placeholder: string; } interface IDatePickerState { calenopen: string; date: Date | string; inputvalue: string | any; value: Date; minDate: Date; maxDate: Date; rangeDateArr: Date[]; showTime: boolean; showValue: boolean; showClear: boolean; } export default class DatePicker extends React.PureComponent { private inputel; private closeEl; private calendarel; static defaultProps: { subweekElement: typeof WeekNumber; subyearElement: typeof YearNumber; submonthElement: typeof MonthNumber; subheadnavElement: typeof DateShortCut; footerElement: null; format: string; open: boolean; minDate: Date; maxDate: Date; defaultDate: Date; showDefaultValue: boolean; onChange: undefined; disabledDate: undefined; showToday: boolean; weekLongTexts: string[]; weekShortTexts: string[]; monthLongTexts: string[]; monthShortTexts: string[]; isSelectRange: boolean; isDouble: boolean; rangeSplitSign: string; isTimePick: boolean; disabled: boolean; }; constructor(props: IDatePickerProps); componentWillReceiveProps(nextProps: IDefaultDatePickerProps): void; clearDate: () => void; getInputVal: (date: any, format: any) => string; onexitPanel: (e: any) => void; onClickOutside: (e: any) => void; setFocusInput: () => void; setFocusPanel: () => void; setOpenPanel(open: any, e: any): void; handerDateChange: (d: any, type: any, e: any) => void; handerInputChange: (e: any) => void; handerInputClick: (e: any) => void; handerBlur: () => void; showTimeEvent: () => void; timeChange: (e: any, str: any, d: any, range: any) => void; handerInputFocus: () => void; processFoucs: () => void; renderDatePicker: ({ getPrefixCls }: ConfigConsumerProps) => JSX.Element; render(): JSX.Element; } export {};