UNPKG

@kelvininc/ui-components

Version:
12 lines (11 loc) 1.19 kB
import dayjs from 'dayjs'; import { DateInputState, EAbsoluteTimeError, IAbsoluteTimeLimits, SelectedRange } from '../../types'; export declare const buildSelectedDatesEventPayload: (dateA?: dayjs.Dayjs, dateB?: dayjs.Dayjs) => SelectedRange; export declare const isEndDateAtStartOfDay: (date: dayjs.Dayjs) => boolean; export declare const getFirstCalendarInitialDate: (displayedMonth: dayjs.Dayjs) => string; export declare const getSecondCalendarInitialDate: (displayedMonth: dayjs.Dayjs) => string; export declare const getMinimumDateFromDayClick: (clickedDate: dayjs.Dayjs, minimumDate: string) => dayjs.Dayjs; export declare const getMaximumDateFromDayClick: (clickedDate: dayjs.Dayjs, maximumDate: string) => dayjs.Dayjs; export declare const getFromDateInputState: (error: EAbsoluteTimeError | undefined, { minDate }: IAbsoluteTimeLimits) => DateInputState | undefined; export declare const getToDateTimeInputState: (error: EAbsoluteTimeError | undefined, { maxDate }: IAbsoluteTimeLimits) => DateInputState | undefined; export declare const getSingleDateTimeInputState: (error: EAbsoluteTimeError | undefined, { minDate, maxDate }: IAbsoluteTimeLimits) => DateInputState | undefined;