import { DateRange, DateRangePreset, DateFormatConfig, CustomFormatFunction, HapticFeedbackType, CustomPresetConfig, CustomPresetDefinition, PresetsConfig, CustomRangeConfig } from './types'; import { CalendarTokenType } from './dateRangePicker.tokens'; /** * Gets the date components (year, month, day, etc.) for a given Date in a specific timezone * @param date The date to get components for * @param timezone IANA timezone string (e.g., "America/New_York") * @returns Object with date components in the target timezone */ export declare const getDatePartsInTimezone: (date: Date, timezone: string) => { year: number; month: number; day: number; hours: number; minutes: number; seconds: number; }; /** * Creates a Date object representing a specific moment in a timezone * This interprets the given date/time as being in the target timezone and returns * the equivalent JavaScript Date object (which is always in UTC internally) * * @param timezone IANA timezone string (e.g., "America/New_York") * @param year Year * @param month Month (0-11) * @param day Day of month (1-31) * @param hours Hours (0-23) * @param minutes Minutes (0-59) * @param seconds Seconds (0-59) * @returns Date object */ export declare const createDateInTimezone: (timezone: string | undefined, year: number, month: number, day: number, hours?: number, minutes?: number, seconds?: number) => Date; /** * Gets the current date/time * @param _timezone Timezone parameter (not used - now is the same moment everywhere) * @returns Current Date object */ export declare const getNowInTimezone: (_timezone: string | undefined) => Date; /** * Gets today's date (at midnight) in the specified timezone * @param timezone IANA timezone string * @returns Date object representing today at 00:00:00 in the specified timezone */ export declare const getTodayInTimezone: (timezone: string | undefined) => Date; /** * Formats a date according to the specified format * @param date The date to format * @param format The format string (e.g., "dd/MM/yyyy") * @param timezone Optional IANA timezone string * @returns The formatted date string or empty string if date is invalid */ export declare const formatDate: (date: Date, format: string, timezone?: string) => string; /** * Parses a date string according to the specified format * @param dateString The date string to parse * @param format The format string * @returns The parsed date or null if invalid */ export declare const parseDate: (dateString: string, format: string, hour: number, minute: number) => Date | null; /** * Checks if a date is valid * @param date The date to check * @returns True if the date is valid */ export declare const isValidDate: (date: Date) => boolean; /** True when a controlled `value` has a usable start date (avoids `.getTime()` on undefined). */ export declare const isControlledDateRange: (value?: DateRange | null) => value is DateRange; /** * Formats time in 12-hour format * @param date The date to format * @returns The formatted time string */ export declare const formatTimeIn12Hour: (date: Date) => string; /** * Formats a date range for display * @param range The date range to format * @param showTime Whether to include time in the formatted string * @returns The formatted date range string */ export declare const formatDateRange: (range: DateRange, showTime?: boolean) => string; /** * Gets a date range based on a preset * @param preset The preset to get the range for * @param timezone Optional IANA timezone string for timezone-aware calculations * @returns The date range for the preset */ export declare const getPresetDateRange: (preset: DateRangePreset, timezone?: string) => DateRange; /** * Gets a label for a preset * @param preset The preset to get the label for * @returns The label for the preset */ export declare const getPresetLabel: (preset: DateRangePreset) => string; /** * Formats time string to HH:MM format * @param time The time string to format * @returns The formatted time string */ export declare const formatTime: (time: string) => string; /** * Validates a time string * @param time The time string to validate * @returns True if the time is valid */ export declare const isValidTime: (time: string) => boolean; /** * Converts a date to string with optional time * @param date The date to convert * @param includeTime Whether to include time * @param timeFormat The time format to use * @returns The formatted date string */ export declare const dateToString: (date: Date, includeTime?: boolean, timeFormat?: string) => string; /** * Checks if two dates are the same day * @param date1 First date * @param date2 Second date * @returns True if dates are the same day */ export declare const isSameDay: (date1: Date, date2: Date) => boolean; /** * Checks if two dates are the same day * @param parts1 Contains year, month, day of first date * @param parts2 Contains year, month, day of second date * @returns True if dates are the same day */ export declare const isSameParts: (part1: { year: number; month: number; day: number; }, part2: { year: number; month: number; day: number; }) => boolean; /** * Checks if a date is within a range * @param date The date to check * @param startDate Range start date * @param endDate Range end date * @returns True if date is in range */ export declare const isDateInRange: (date: Date, startDate: Date, endDate: Date) => boolean; /** * Gets the number of days in a month * @param year The year * @param month The month (0-based) * @returns The number of days in the month */ export declare const getDaysInMonth: (year: number, month: number) => number; /** * Gets the first day of the month (0 = Sunday) * @param year The year * @param month The month (0-based) * @returns The day of the week (0-6) */ export declare const getFirstDayOfMonth: (year: number, month: number) => number; /** * Generates a calendar grid for a month * @param year The year * @param month The month (0-based) * @returns Array of weeks, each containing day numbers or null for empty cells */ export declare const generateCalendarGrid: (year: number, month: number) => (number | null)[][]; /** * Checks if a date is the start date of a range * @param date The date to check * @param selectedRange The selected date range * @param timezone The timezone for the date range * @returns True if the date is the start date */ export declare const isStartDate: (date: Date, startDate: Date, timezone?: string) => boolean; /** * Checks if a date is the end date of a range (but not if it's the same as start date) * @param date The date to check * @param selectedRange The selected date range * @returns True if the date is the end date and different from start date */ export declare const isEndDate: (date: Date, startDate: Date, endDate: Date, timezone?: string) => boolean; /** * Checks if a date is within a selected range (not including start/end) * @param date The date to check * @param selectedRange The selected date range * @returns True if the date is in the range */ export declare const isInSelectedRange: (date: Date, selectedRange: DateRange, timezone?: string) => boolean; /** * Checks if a date is today * @param date The date to check * @param today Today's date * @returns True if the date is today */ export declare const isDateToday: (date: Date, today: Date) => boolean; /** * Creates a proper single date range (24-hour selection within the same day) * @param date The date to create a range for * @returns DateRange spanning the entire day (same date, different times) */ export declare const createSingleDateRange: (date: Date, timezone?: string, disableFutureDates?: boolean, disablePastDates?: boolean, today?: Date) => DateRange; /** * Handles date click logic for calendar with clean first click = start, second click = end pattern * @param clickedDate The date that was clicked * @param selectedRange Current selected range * @param allowSingleDateSelection Whether single date selection is allowed * @param today Today's date for validation * @param disableFutureDates Whether future dates are disabled * @param disablePastDates Whether past dates are disabled * @param isDoubleClick Whether this is a double-click event * @returns New date range or null if click should be ignored */ export declare const handleCalendarDateClick: (clickedDate: Date, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, isDoubleClick?: boolean, timezone?: string, selectedRange?: DateRange, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, maxRangeDays?: number) => DateRange | null; /** * Generates calendar weeks for a specific month with consistent alignment * @param year The year * @param month The month (0-based) * @returns Array of weeks with day numbers or null for empty cells */ export declare const generateMonthWeeks: (year: number, month: number) => (number | null)[][]; /** * Generates the list of months to display in calendar * @param startYear Starting year * @param startMonth Starting month (0-based) * @param endYear Ending year * @returns Array of month/year objects */ export declare const generateCalendarMonths: (startYear?: number, startMonth?: number, endYear?: number) => { month: number; year: number; }[]; /** * Generates initial months around current date (4-5 months) * @param today Current date * @returns Array of initial months to display */ export declare const generateInitialMonths: (today: Date) => { month: number; year: number; }[]; /** * Generates a chunk of months for progressive loading * @param startYear Starting year * @param startMonth Starting month (0-based) * @param endYear Ending year for this chunk * @param endMonth Ending month for this chunk (0-based) * @returns Array of months for the chunk */ export declare const generateMonthChunk: (startYear: number, startMonth: number, endYear: number, endMonth?: number) => { month: number; year: number; }[]; /** * Calculates the next chunk to load based on current data * @param currentMonths Currently loaded months * @param direction Direction to load ('past' or 'future') * @returns Next chunk parameters or null if reached bounds */ export declare const getNextChunkParams: (currentMonths: { month: number; year: number; }[], direction: "past" | "future") => { startYear: number; startMonth: number; } | null; /** * Gets month name from month index * @param monthIndex Month index (0-based) * @returns Month name */ export declare const getMonthName: (monthIndex: number) => string; /** * Gets day names for calendar header * @returns Array of day names */ export declare const getDayNames: () => string[]; /** * Calculates the height of a single month in the calendar * @param year The year of the month * @param month The month (0-based) * @returns Height in pixels */ export declare const getMonthHeight: (year?: number, month?: number) => number; /** * Calculates which months should be visible in the viewport * @param scrollTop Current scroll position * @param containerHeight Height of the scrollable container * @param months Array of all months * @param monthHeight Height of each month * @param buffer Number of months to render outside viewport for smooth scrolling * @returns Object with start/end indices and visible months */ export declare const getVisibleMonths: (scrollTop: number, containerHeight: number, months: { month: number; year: number; }[], monthHeight: number, buffer?: number) => { startIndex: number; endIndex: number; visibleMonths: { month: number; year: number; index: number; }[]; totalHeight: number; }; /** * Throttle function to limit how often a function can be called * @param func Function to throttle * @param limit Time limit in milliseconds * @returns Throttled function */ export declare const throttle: unknown>(func: T, limit: number) => ((...args: Parameters) => void); /** * Calculates the top offset for a month at a given index * @param index Month index * @param monthHeight Height of each month * @returns Top offset in pixels */ export declare const getMonthOffset: (index: number, monthHeight: number) => number; /** * Finds the month that contains today's date * @param months Array of months * @param today Today's date * @returns Index of the month containing today */ export declare const findCurrentMonthIndex: (months: { month: number; year: number; }[], targetMonth: number, targetYear: number) => number; /** * Scrolls to a specific month * @param monthIndex Index of the month to scroll to * @param monthHeight Height of each month * @returns Scroll position */ export declare const getScrollToMonth: (monthIndex: number, monthHeight: number) => number; /** * Gets all the states for a date cell * @param date The date to check * @param selectedRange Current selected range * @param today Today's date * @param disableFutureDates Whether future dates are disabled * @param disablePastDates Whether past dates are disabled * @param customDisableDates Custom function to disable specific dates * @returns Object with all date states */ export declare const getDateCellStates: (date: Date, selectedRange: DateRange | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, timezone?: string, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, maxRangeDays?: number) => { isStart: boolean; isEnd: boolean; isRangeDay: boolean; isTodayDay: boolean; isSingleDate: boolean; isDisabled: boolean; }; /** * Determines if a today indicator should be shown * @param dateStates Object containing all date states * @returns Boolean indicating if today indicator should be shown */ export declare const shouldShowTodayIndicator: (dateStates: ReturnType) => boolean; /** * Validation result for date input */ export type DateValidationResult = { isValid: boolean; error: 'none' | 'format' | 'invalid-date' | 'out-of-range'; message?: string; }; /** * Interface for date range picker tokens used in styling functions */ export type DateRangePickerTokens = { calendar: { dayCell: Record; singleDate: Record; startDate: Record; endDate: Record; rangeDay: Record; todayDay: Record; }; states: { disabledDay: Record; }; text: { selectedDay: { color?: string | unknown; }; todayDay: { color?: string | unknown; }; dayNumber: { color?: string | unknown; }; }; }; /** * Validates date format and date values * @param value The input value to validate * @param format The expected format (e.g., 'dd/MM/yyyy') * @param disableFutureDates Whether future dates should be disabled * @param disablePastDates Whether past dates should be disabled * @returns Validation result with specific error type */ export declare const validateDateInput: (value: string, format: string, disableFutureDates?: boolean, disablePastDates?: boolean, timezone?: string) => DateValidationResult; /** * Formats date input as user types, adding slashes automatically * @param value The input value to format * @param format The target format (e.g., 'dd/MM/yyyy') * @returns Formatted input value */ export declare const formatDateInput: (value: string, format: string) => string; /** * Checks if date input is complete (full format length) * @param value The input value to check * @param format The expected format * @returns True if input is complete */ export declare const isDateInputComplete: (value: string, format: string) => boolean; /** * Formats date display for the trigger button * @param selectedRange Current selected date range * @param allowSingleDateSelection Whether single date selection is allowed * @returns Formatted display string */ export declare const formatDateDisplay: (selectedRange: DateRange | undefined, allowSingleDateSelection?: boolean, timezone?: string, isSingleDatePicker?: boolean) => string; /** * Handles date input change with formatting and validation * @param value Input value * @param dateFormat Date format string * @param currentRange Current selected range * @param timeValue Current time value (HH:mm) * @param isStartDate Whether this is start date or end date * @param disableFutureDates Whether future dates should be disabled * @param disablePastDates Whether past dates should be disabled * @returns Object with formatted value, validation result, and updated range */ export declare const handleDateInputChange: (value: string, dateFormat: string, currentRange: DateRange | undefined, timeValue?: string, isStartDate?: boolean, disableFutureDates?: boolean, disablePastDates?: boolean, timezone?: string) => { formattedValue: string; validation: DateValidationResult; updatedRange?: DateRange; }; /** * Handles time change for date range * @param time New time value (HH:mm) * @param currentRange Current selected range * @param isStartTime Whether this is start time or end time * @returns Updated date range */ export declare const handleTimeChange: (time: string, currentRange: DateRange, timezone?: string, isStartTime?: boolean) => DateRange; /** * Handles date selection from calendar * @param range Selected date range from calendar * @param startTime Current start time * @param endTime Current end time * @param dateFormat Date format string * @returns Object with updated range and formatted date strings */ export declare const handleCalendarDateSelect: (range: DateRange, startTime: string, dateFormat: string, timezone?: string, endTime?: string) => { updatedRange: DateRange; formattedStartDate: string; formattedEndDate?: string; }; /** * Handles preset selection * @param preset Selected preset * @param dateFormat Date format string * @returns Object with updated range, formatted dates, and times */ export declare const handlePresetSelection: (preset: DateRangePreset, dateFormat: string, timezone?: string) => { updatedRange: DateRange; formattedStartDate: string; formattedEndDate: string; formattedStartTime: string; formattedEndTime: string; } | null; /** * Handles loading more months in calendar * @param months Current months array * @param direction Direction to load ('past' or 'future') * @param isLoadingPast Current loading state for past * @param isLoadingFuture Current loading state for future * @returns Promise that resolves when loading is complete */ export declare const handleLoadMoreMonths: (months: { month: number; year: number; }[], direction: "past" | "future", isLoadingPast: boolean, isLoadingFuture: boolean) => Promise<{ month: number; year: number; }[] | null>; /** * Handles scroll position updates for calendar * @param scrollTop Current scroll position * @param scrollHeight Total scroll height * @param clientHeight Client height * @param loadThreshold Threshold for triggering loads * @returns Object indicating what should be loaded */ export declare const handleCalendarScroll: (scrollTop: number, scrollHeight: number, clientHeight: number, loadThreshold?: number) => { shouldLoadPast: boolean; shouldLoadFuture: boolean; }; /** * Creates calendar month data structure for rendering * @param year Year of the month * @param month Month (0-based) * @param monthIndex Index in the months array * @param monthHeight Height of each month * @returns Month data for rendering */ export declare const createCalendarMonthData: (year: number, month: number, monthIndex: number, monthHeight: number) => { key: string; year: number; month: number; weeks: (number | null)[][]; topOffset: number; monthHeight: number; monthName: string; }; /** * Calculates day cell props for rendering * @param date Date object * @param selectedRange Current selected range * @param today Today's date * @param disableFutureDates Whether future dates are disabled * @param disablePastDates Whether past dates are disabled * @param calendarToken Calendar token for styling * @param customDisableDates Custom function to disable specific dates * @returns Day cell props */ export declare const calculateDayCellProps: (date: Date, selectedRange: DateRange | undefined, today: Date, disableFutureDates: boolean, disablePastDates: boolean, calendarToken: CalendarTokenType, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, timezone?: string, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, maxRangeDays?: number) => { dateStates: ReturnType; styles: Record; textColor: string | unknown; showTodayIndicator: boolean; }; /** * Generates picker data for date/time selection * @param tabType Whether this is for start or end date * @param selectedRange Current selected date range * @param startTime Current start time * @param endTime Current end time * @returns Object with picker data for all columns */ export declare const generatePickerData: (tabType: "start" | "end", selectedRange?: DateRange, startTime?: string, endTime?: string, maxYearOffset?: number) => { years: { items: number[]; selectedIndex: number; }; months: { items: string[]; selectedIndex: number; }; dates: { items: number[]; selectedIndex: number; }; times: { items: string[]; selectedIndex: number; }; }; /** * Creates selection handler for picker columns * @param tabType Whether this is for start or end date * @param type The type of selection (year, month, date, time) * @param selectedRange Current selected range * @param dateFormat Date format string * @param handleStartTimeChange Start time change handler * @param handleEndTimeChange End time change handler * @param setSelectedRange Range setter function * @param setStartDate Start date setter function * @param setEndDate End date setter function * @returns Selection handler function */ export declare const createSelectionHandler: (tabType: "start" | "end", type: "year" | "month" | "date" | "time", dateFormat: string, handleStartTimeChange: (time: string) => void, handleEndTimeChange: (time: string) => void, setSelectedRange: (range: DateRange) => void, setStartDate: (date: string) => void, setEndDate: (date: string) => void, selectedRange?: DateRange, maxYearOffset?: number) => (index: number) => void; /** * Gets preset display label with custom mappings * @param preset The preset to get label for * @returns Display label for the preset */ export declare const getPresetDisplayLabel: (preset: DateRangePreset) => string; /** * Enhanced date range formatting with preset patterns * @param range The date range to format * @param config Format configuration * @returns Formatted date range string */ export declare const formatDateRangeWithConfig: (range: DateRange, config?: DateFormatConfig, timezone?: string) => string; /** * Creates a custom trigger element with enhanced formatting * @param range Current selected date range * @param config Format configuration * @param placeholder Placeholder text when no range is selected * @returns Formatted display string for trigger */ export declare const formatTriggerDisplay: (range: DateRange | undefined, config?: DateFormatConfig, isSingleDatePicker?: boolean, placeholder?: string, timezone?: string) => string; /** * Predefined format configurations for common use cases */ export declare const FORMAT_PRESETS: { readonly COMPACT_NO_TIME: DateFormatConfig; readonly COMPACT_NO_YEAR: DateFormatConfig; readonly MEDIUM_NO_TIME: DateFormatConfig; readonly MEDIUM_WITH_TIME: DateFormatConfig; readonly VERBOSE_NO_TIME: DateFormatConfig; readonly VERBOSE_WITH_TIME: DateFormatConfig; readonly ISO_FORMAT: DateFormatConfig; readonly ISO_WITH_TIME: DateFormatConfig; readonly US_FORMAT: DateFormatConfig; readonly US_WITH_TIME: DateFormatConfig; }; /** * Helper function to create custom format functions * @param formatFn Custom formatting function * @returns DateFormatConfig with custom format */ export declare const createCustomFormat: (formatFn: CustomFormatFunction) => DateFormatConfig; /** * Example custom format functions */ export declare const CUSTOM_FORMAT_EXAMPLES: { RELATIVE: DateFormatConfig; BUSINESS: DateFormatConfig; MINIMAL: DateFormatConfig; }; /** * Enhanced haptic feedback utility with better error handling * @param type The type of haptic feedback to trigger */ export declare const triggerHapticFeedback: (type?: HapticFeedbackType) => void; export declare class calendarHapticManager { private lastHapticTime; private lastHapticIndex; private readonly hapticCooldown; private isDestroyed; /** * Triggers haptic feedback when scrolling to a new item * @param currentIndex The current selected index */ triggerScrollHaptic(currentIndex: number): void; triggerSelectionHaptic(): void; reset(): void; destroy(): void; } export declare const MOBILE_CALENDAR_CONSTANTS: { readonly SNAP_DURATION: 340; readonly MOMENTUM_THRESHOLD: 0.01; readonly DECELERATION_RATE: 0.95; readonly MIN_VELOCITY: 0.005; readonly MAX_MOMENTUM_DISTANCE: 50; readonly VELOCITY_MULTIPLIER: 0.8; readonly VELOCITY_SMOOTHING: 0.7; readonly SCROLL_RESISTANCE: 0.95; readonly SCALE_SELECTED: 1.02; readonly SCALE_UNSELECTED: 0.98; readonly OPACITY_SELECTED: 1; readonly OPACITY_UNSELECTED: 0.9; readonly TRANSITION_DURATION: "220ms"; readonly EASING: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"; readonly ANIMATION_FRAME_LIMIT: 60; readonly VELOCITY_HISTORY_SIZE: 3; }; export declare const MOBILE_PICKER_CONSTANTS: { readonly ITEM_HEIGHT: 44; readonly VISIBLE_ITEMS: 3; readonly SCROLL_DEBOUNCE: 130; }; /** * Safely gets an item from an array with comprehensive bounds checking * @param items The array of items * @param index The index to access * @returns The item at the index or empty string if out of bounds */ export declare const safeGetPickerItem: (items: (string | number)[], index: number) => string; /** * Calculates the visible items for the picker with robust bounds checking * @param items The array of items * @param selectedIndex The currently selected index * @returns Object with top, center, and bottom items plus availability flags */ export declare const getPickerVisibleItems: (items: (string | number)[], selectedIndex: number) => { topItem: string; centerItem: string; bottomItem: string; hasTopItem: boolean; hasBottomItem: boolean; }; /** * Validates and clamps an index to array bounds with safety checks * @param index The index to validate * @param arrayLength The length of the array * @returns Clamped index within bounds */ export declare const clampPickerIndex: (index: number, arrayLength: number) => number; /** * Calculates scroll position for a given index with validation * @param index The target index * @param itemHeight Height of each item * @returns Scroll position in pixels */ export declare const calculateScrollPosition: (index: number, itemHeight: number) => number; /** * Calculates index from scroll position with bounds checking * @param scrollTop Current scroll position * @param itemHeight Height of each item * @returns Calculated index */ export declare const calculateIndexFromScroll: (scrollTop: number, itemHeight: number) => number; /** * Validates time input with comprehensive checks * @param input The input string to validate * @returns True if input is valid */ export declare const isValidTimeInput: (input: string) => boolean; /** * Formats time input with better validation * @param input The input string to format * @returns Formatted time string */ export declare const formatTimeInput: (input: string) => string; /** * Validates if a date range has valid date/time combinations * @param range The date range to validate * @param allowSingleDateSelection Whether single date selection is allowed * @returns Validation result with specific error information */ export declare const validateDateTimeRange: (range: DateRange, isSingleDatePicker: boolean) => { isValid: boolean; error: "none" | "invalid-time-order" | "missing-dates" | "invalid-single-date"; message?: string; }; /** * Checks if a date should be hidden from calendar view * @param date The date to check * @param today Today's date * @param disableFutureDates Whether future dates should be hidden * @param disablePastDates Whether past dates should be hidden * @param hideFutureDates Whether to completely hide future dates (not just disable) * @param hidePastDates Whether to completely hide past dates (not just disable) * @returns True if the date should be hidden */ export declare const shouldHideDateFromCalendar: (date: Date, today: Date, hideFutureDates?: boolean, hidePastDates?: boolean) => boolean; /** * Enhanced calendar date click handler with proper single date selection * @param clickedDate The date that was clicked * @param selectedRange Current selected range * @param allowSingleDateSelection Whether single date selection is allowed * @param today Today's date for validation * @param disableFutureDates Whether future dates are disabled * @param disablePastDates Whether past dates are disabled * @param isDoubleClick Whether this is a double-click event * @returns New date range or null if click should be ignored */ export declare const handleEnhancedCalendarDateClick: (clickedDate: Date, selectedRange: DateRange, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, isDoubleClick?: boolean) => DateRange | null; /** * Validates custom range configuration * @param config The custom range configuration to validate * @returns Validation result */ export declare const validateCustomRangeConfig: (config: CustomRangeConfig) => { isValid: boolean; error?: string; }; /** * Handles calendar date click with custom range configuration support * @param clickedDate The date that was clicked * @param selectedRange Current selected range * @param allowSingleDateSelection Whether single date selection is allowed * @param today Today's date for validation * @param disableFutureDates Whether future dates are disabled * @param disablePastDates Whether past dates are disabled * @param customRangeConfig Custom range configuration * @param isDoubleClick Whether this is a double-click event * @returns New date range or null if click should be ignored */ export declare const handleCustomRangeCalendarDateClick: (clickedDate: Date, allowSingleDateSelection: boolean | undefined, today: Date, disableFutureDates?: boolean, disablePastDates?: boolean, customRangeConfig?: CustomRangeConfig, isDoubleClick?: boolean, timezone?: string, selectedRange?: DateRange, isSingleDatePicker?: boolean, minDate?: Date, maxDate?: Date, customDisableDates?: (date: Date, currentRange?: DateRange) => boolean, maxRangeDays?: number) => DateRange | null; /** * Checks if two dates represent the same calendar day (ignoring time and timezone) */ export declare const isSameCalendarDay: (date1: Date, date2: Date) => boolean; /** * Checks if a date range represents a full day in any timezone */ export declare const isFullDayRange: (startDate: Date, endDate: Date) => boolean; export declare const convertLocalDateToTimezoneDate: (date: Date, timezone?: string) => Date; /** * Checks if a date range matches "Today" preset */ export declare const matchesTodayPreset: (range: DateRange, timezone?: string) => boolean; /** * Checks if a date range matches "Yesterday" preset */ export declare const matchesYesterdayPreset: (range: DateRange, timezone?: string) => boolean; /** * Checks if a date range matches "Tomorrow" preset */ export declare const matchesTomorrowPreset: (range: DateRange) => boolean; /** * Checks if a date range matches "This Month" preset */ export declare const matchesThisMonthPreset: (range: DateRange) => boolean; /** * Checks if a date range matches "Last Month" preset */ export declare const matchesLastMonthPreset: (range: DateRange) => boolean; /** * Robust preset detection that works with both UTC and local timezone dates */ export declare const detectPresetFromRange: (range: DateRange, timezone?: string, presetConfigs?: CustomPresetConfig[]) => DateRangePreset; /** * Default preset configuration for the DateRangePicker */ export declare const DEFAULT_PRESET_CONFIG: DateRangePreset[]; /** * Get custom preset definition by ID */ export declare const getCustomPresetDefinition: (id: string) => CustomPresetDefinition | undefined; /** * Processes custom presets configuration and returns normalized preset configs * @param customPresets User-provided presets configuration * @returns Array of normalized CustomPresetConfig objects */ export declare const processCustomPresets: (customPresets?: PresetsConfig) => CustomPresetConfig[]; /** * Filters presets based on visibility and other criteria * @param presetConfigs Array of preset configurations * @param disableFutureDates Whether future date presets should be excluded * @param disablePastDates Whether past date presets should be excluded * @returns Array of visible and enabled presets */ export declare const getFilteredPresets: (presetConfigs: CustomPresetConfig[], disableFutureDates?: boolean, disablePastDates?: boolean) => DateRangePreset[]; /** * Gets the label for a preset, using custom label if provided * @param preset The preset to get label for * @param presetConfigs Array of preset configurations with potential custom labels * @returns The label for the preset */ export declare const getPresetLabelWithCustom: (preset: DateRangePreset, presetConfigs?: CustomPresetConfig[]) => string; /** * Creates a preset configuration with custom label and visibility * @param preset The preset enum value * @param label Optional custom label * @param visible Whether the preset should be visible (default: true) * @returns CustomPresetConfig object */ export declare const createPresetConfig: (preset: DateRangePreset, label?: string, visible?: boolean) => CustomPresetConfig; /** * Helper function to create common preset configurations */ export declare const PRESET_HELPERS: { /** * Creates a configuration for time-based presets only */ timeBasedOnly: () => CustomPresetConfig[]; /** * Creates a configuration for day-based presets only */ dayBasedOnly: () => CustomPresetConfig[]; /** * Creates a configuration for month-based presets only */ monthBasedOnly: () => CustomPresetConfig[]; /** * Creates a minimal preset configuration */ minimal: () => CustomPresetConfig[]; /** * Creates a comprehensive preset configuration */ comprehensive: () => CustomPresetConfig[]; /** * Creates a configuration with custom labels */ withCustomLabels: () => CustomPresetConfig[]; /** * Creates a configuration with some presets hidden */ selectiveVisibility: () => CustomPresetConfig[]; };