@i-novus/ui-core
Version:
Базовые UI компоненты
19 lines (18 loc) • 724 B
TypeScript
import { FocusEvent, MutableRefObject, RefObject } from 'react';
import { Dayjs } from 'dayjs';
type CalendarInputEventsConfig = {
onBlur?: Function;
onEnterKeyDown?: Function;
onFocus?: Function;
};
type DateRangeOptions = {
maxDate?: Dayjs | null;
minDate?: Dayjs | null;
dateFormat?: string;
value?: Date | string | null;
};
export declare const useDatePickerInputEvents: (calendarOpen: boolean, calendarElem: MutableRefObject<HTMLElement> | RefObject<HTMLElement>, { onFocus, onBlur, onEnterKeyDown }: CalendarInputEventsConfig, dateRangeOptions?: DateRangeOptions) => {
handleFocus: () => void;
handleBlur: (event: FocusEvent<HTMLInputElement>, setValue: any) => void;
};
export {};