/** * @file DateRangePicker * @description 自定义日期范围时间选择器组件 */ import React, { CSSProperties } from 'react'; import moment from 'dayjs'; import { ShortCuts } from '../date-picker2'; import { type ClassValue } from '../../utils/cx'; export interface PlainObject { [propsName: string]: any; } export interface DateRangePickerProps { className?: ClassValue; style?: CSSProperties; popoverClassName?: string; placeholder?: string; theme?: any; format: string; utc?: boolean; inputFormat?: string; ranges?: string | Array; clearable?: boolean; minDate?: moment.Dayjs; maxDate?: moment.Dayjs; minDuration?: number; maxDuration?: number; joinValues: boolean; delimiter: string; value?: any; onChange: (value: any) => void; data?: any; disabled?: boolean; closeOnSelect?: boolean; overlayPlacement: string; timeFormat?: string; resetValue?: any; container?: any; dateFormat?: string; embed?: boolean; viewMode?: 'days' | 'months' | 'years' | 'time' | 'quarter'; borderMode?: 'full' | 'half' | 'none'; translate: any; onFocus?: Function; onBlur?: Function; quickStatic?: boolean; quickStaticStr?: boolean; staticPlaceholder?: string; quickEdit?: boolean; } export interface DateRangePickerState { isOpened: boolean; isFocused: boolean; startDate?: moment.Dayjs; endDate?: moment.Dayjs; } export declare const availableRanges: { [propName: string]: any; }; export declare const advancedRanges: ({ regexp: RegExp; resolve: (__: any, _: string, hours: string) => { label: any; startDate: (now: moment.Dayjs) => moment.Dayjs; endDate: (now: moment.Dayjs) => moment.Dayjs; }; } | { regexp: RegExp; resolve: (__: any, _: string, hours: number) => { label: any; startDate: (now: moment.Dayjs) => moment.Dayjs; endDate: (now: moment.Dayjs) => moment.Dayjs; }; })[]; export declare class DateRangePicker extends React.Component { static contextType: any; static defaultProps: { placeholder: string; format: string; inputFormat: string; joinValues: boolean; clearable: boolean; delimiter: string; ranges: string; resetValue: string; closeOnSelect: boolean; overlayPlacement: string; container: HTMLElement; }; innerDom: any; popover: any; input?: HTMLInputElement; isFirstClick: boolean; static formatValue(newValue: any, format: string, joinValues: boolean, delimiter: string, utc?: boolean): any; static unFormatValue(value: any, format: string, joinValues: boolean, delimiter: string): { startDate: moment.Dayjs; endDate: moment.Dayjs; }; dom: React.RefObject; nextMonth: moment.Dayjs; constructor(props: DateRangePickerProps); componentDidUpdate(prevProps: DateRangePickerProps): void; focus(): void; blur(): void; handleFocus(e: React.SyntheticEvent): void; handleBlur(e: React.SyntheticEvent): void; open(): void; close(): void; handleClick(): void; handlePopOverClick(e: React.MouseEvent): void; handleKeyPress(e: React.KeyboardEvent): void; confirm(): void; filterDate(date: moment.Dayjs, originValue?: moment.Dayjs, timeFormat?: string, type?: 'start' | 'end'): moment.Dayjs; handleSelectChange(newValue: moment.Dayjs): void; handleTimeStartChange(newValue: moment.Dayjs): void; handleTimeEndChange(newValue: moment.Dayjs): void; handleMobileChange(data: any, callback?: () => void): void; selectRannge(range: PlainObject): void; renderRanges(ranges: string | Array | undefined): JSX.Element; clearValue(e: React.MouseEvent): void; checkStartIsValidDate(currentDate: moment.Dayjs): boolean; checkEndIsValidDate(currentDate: moment.Dayjs): boolean; renderDay(props: any, currentDate: moment.Dayjs): JSX.Element; renderQuarter(props: any, quarter: number, year: number): JSX.Element; renderCalendar(): JSX.Element; render(): JSX.Element; } declare const _default: any; export default _default;