UNPKG

@i-novus/ui-core

Version:

Базовые UI компоненты

21 lines (20 loc) 835 B
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; fullFormat?: string; value?: Date | string | null; isInterval?: boolean; }; export declare const useDatePickerInputEvents: (isCalendarOpen: MutableRefObject<boolean>, calendarElem: MutableRefObject<HTMLElement> | RefObject<HTMLElement>, { onFocus, onBlur, onEnterKeyDown }: CalendarInputEventsConfig, dateRangeOptions?: DateRangeOptions) => { handleFocus: () => void; handleBlur: (event: FocusEvent<HTMLInputElement>, setValue: any) => void; onBlurEvent: (event?: FocusEvent<HTMLInputElement>) => void; }; export {};