import { Instance } from 'flatpickr/dist/types/instance'; import { BaseOptions, Hook } from 'flatpickr/dist/types/options'; import { Locale } from 'flatpickr/dist/types/locale'; export declare const _defaultCalendarTooltipStrings: { lockedStartDate: string; lockedEndDate: string; dateLocked: string; dateNotAvailable: string; dateInSelectedRange: string; }; export type FlatpickrTextStrings = Partial; export declare function setTooltipStrings(customTextStrings?: FlatpickrTextStrings): void; export declare function getTextStrings(customTextStrings?: FlatpickrTextStrings): typeof _defaultCalendarTooltipStrings; interface BaseFlatpickrContext { getFlatpickrOptions: () => Promise>; setCalendarAttributes: (instance: Instance) => void; setInitialDates?: (instance: Instance) => void; } interface SingleFlatpickrContext extends BaseFlatpickrContext { inputEl: HTMLElement; } interface RangeFlatpickrContext extends BaseFlatpickrContext { inputEl: HTMLElement; endinputEl?: HTMLElement; } declare const DATE_FORMAT_OPTIONS: { readonly 'Y-m-d': "yyyy-mm-dd"; readonly 'm-d-Y': "mm-dd-yyyy"; readonly 'd-m-Y': "dd-mm-yyyy"; readonly 'Y-m-d H:i': "yyyy-mm-dd —— : ——"; readonly 'Y-m-d h:i K': "yyyy-mm-dd —— : ——"; readonly 'm-d-Y H:i': "mm-dd-yyyy —— : ——"; readonly 'm-d-Y h:i K': "mm-dd-yyyy —— : ——"; readonly 'd-m-Y H:i': "dd-mm-yyyy —— : ——"; readonly 'd-m-Y h:i K': "dd-mm-yyyy —— : ——"; readonly 'Y-m-d H:i:s': "yyyy-mm-dd —— : —— ——"; readonly 'Y-m-d H:i:S': "yyyy-mm-dd —— : —— ——"; readonly 'm-d-Y H:i:s': "mm-dd-yyyy —— : —— ——"; readonly 'm-d-Y H:i:S': "mm-dd-yyyy —— : —— ——"; readonly 'd-m-Y H:i:s': "dd-mm-yyyy —— : —— ——"; readonly 'd-m-Y H:i:S': "dd-mm-yyyy —— : —— ——"; }; type DateFormatOption = keyof typeof DATE_FORMAT_OPTIONS; interface FlatpickrOptionsContext { locale: string; dateFormat?: string; /** @deprecated Prefer passing pre-normalized `value` and using setInitialDates in the component. */ defaultDate?: string | Date | string[] | Date[]; defaultHour?: number; defaultMinute?: number; enableTime: boolean; twentyFourHourFormat?: boolean; endinputEl?: HTMLElement; inputEl: HTMLElement; allowInput?: boolean; minDate?: string | number | Date; maxDate?: string | number | Date; minTime?: string | number | Date; maxTime?: string | number | Date; enable?: (string | number | Date)[]; disable?: (string | number | Date)[]; onChange?: Hook; onClose?: Hook; onOpen?: Hook; onReady?: Hook; loadLocale: (locale: string) => Promise>; mode?: 'single' | 'multiple' | 'range' | 'time'; closeOnSelect?: boolean; wrap?: boolean; noCalendar?: boolean; appendTo?: HTMLElement; static?: boolean; } export declare function preventFlatpickrOpen(event: Event, setShouldFlatpickrOpen: (value: boolean) => void): void; export declare function handleInputClick(setShouldFlatpickrOpen: (value: boolean) => void): void; export declare function handleInputFocus(shouldFlatpickrOpen: boolean, closeFlatpickr: () => void, setShouldFlatpickrOpen: (value: boolean) => void): void; export declare function modifyWeekdayShorthands(localeOptions: Partial): void; export declare function injectFlatpickrStyles(customStyle: string): void; export declare function initializeMultiAnchorFlatpickr(context: RangeFlatpickrContext): Promise; export declare function initializeSingleAnchorFlatpickr(context: SingleFlatpickrContext & { appendTo?: HTMLElement; }): Promise; export declare function isValidDateFormat(format: string): format is DateFormatOption; export declare function getPlaceholder(dateFormat: string, isDateRange?: boolean): string; export declare function loadLocale(locale: string): Promise>; export declare function getModalContainer(element: HTMLElement): HTMLElement; export declare function getFlatpickrOptions(context: FlatpickrOptionsContext): Promise>; export declare function updateEnableTime(dateFormat: string): boolean; export declare function setCalendarAttributes(instance: Instance, modalDetected?: boolean): void; export declare function hideEmptyYear(): void; export declare function emitValue(element: HTMLElement, eventName: string, detail: any): void; export declare function clearFlatpickrInput(flatpickrInstance: Instance | undefined, inputEl: HTMLInputElement | undefined, updateCallback?: () => void): Promise; export declare enum DateRangeEditableMode { BOTH = "both", START = "start", END = "end", NONE = "none" } export declare function createDateRangeDayLockHandler(editableMode: DateRangeEditableMode, currentValue: [Date | null, Date | null]): (dObj: Date, dStr: string, fp: Instance, dayElem: HTMLElement & { dateObj: Date; }) => void; export declare function createDateRangeChangeLockHandler(editableMode: DateRangeEditableMode, currentValue: [Date | null, Date | null], originalOnChange: Hook | Hook[]): (selectedDates: Date[], dateStr: string, instance: Instance) => void; export declare function applyDateRangeEditingRestrictions(options: Partial, editableMode: DateRangeEditableMode, currentValue: [Date | null, Date | null], tooltipStrings?: FlatpickrTextStrings): Partial; export {}; //# sourceMappingURL=flatpickr.d.ts.map