UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

57 lines (56 loc) 2.12 kB
/** * @description 月份范围选择器 */ import React from 'react'; import moment from 'moment'; import type { PlainObject } from 'jamis-core'; import type { MonthRangePickerProps } from '../types'; interface MonthRangePickerState { isOpened: boolean; isFocused: boolean; startDate?: moment.Moment; endDate?: moment.Moment; } export declare class MonthRangePicker extends React.Component<MonthRangePickerProps, MonthRangePickerState> { static defaultProps: { placeholder: string; format: string; inputFormat: string; joinValues: boolean; clearable: boolean; delimiter: string; resetValue: string; closeOnSelect: boolean; overlayPlacement: string; }; innerDom: any; popover: any; input?: HTMLInputElement; dom: React.RefObject<HTMLDivElement>; nextMonth: moment.Moment; constructor(props: MonthRangePickerProps); componentDidUpdate(prevProps: MonthRangePickerProps): void; focus(): void; blur(): void; handleFocus(e: React.SyntheticEvent<HTMLDivElement>): void; handleBlur(e: React.SyntheticEvent<HTMLDivElement>): void; open(): void; close(): void; handleClick(): void; handlePopOverClick(e: React.MouseEvent<any>): void; handleKeyPress(e: React.KeyboardEvent): void; confirm(): void; filterDate(date: moment.Moment, originValue?: moment.Moment, timeFormat?: string, type?: 'start' | 'end'): moment.Moment; handleStartChange(newValue: moment.Moment): void; handleEndChange(newValue: moment.Moment): void; handleMobileChange(data: any, callback?: () => void): void; selectRannge(range: PlainObject): void; renderRanges(ranges: MonthRangePickerProps['ranges']): JSX.Element | null; clearValue(e: React.MouseEvent<any>): void; checkValidStartDate(currentDate: moment.Moment): boolean; checkValidEndDate(currentDate: moment.Moment): boolean; renderMonth: (props: any, month: number, year: number) => JSX.Element; renderCalendar(): JSX.Element; render(): JSX.Element; } export default MonthRangePicker;