import { BoxProps, Factory, PopoverProps, StylesApiProps } from '@mantine/core'; import { DatesRangeValue } from '@mantine/dates'; import dayjs from 'dayjs'; import { DateRangePickerInlineCalendarProps } from './DateRangePickerInlineCalendar.js'; export type DateRangePickerStylesNames = 'input'; export interface DateRangePickerProps extends BoxProps, Pick, Pick, StylesApiProps { /** * Called when the target input is clicked */ onClick?(): void; /** * Function called when the cancel button is clicked. */ onCancel?(): void; /** * Function called when the date range value changes. */ onChange?(dates: DatesRangeValue): void; /** * Called when the popover opened state changes. */ onOpenedChange?(opened: boolean): void; /** * Optional formatter function to format the date value. * Receives the date prop and should return a string. * @default (time) => dayjs(time).format('MMM D, YYYY') */ formatter?: (time: dayjs.ConfigType) => string; /** * The placeholder label to display when no date range is selected. * * @default "Select date range" */ placeholder?: string; /** * Default value for uncontrolled input */ defaultValue?: DatesRangeValue; /** * Value for controlled input */ value?: DatesRangeValue; /** * Sync the selected dates to URL query parameters */ syncWithUrl?: boolean; /** * Error message to display. */ error?: string; } export type DateRangePickerFactory = Factory<{ props: DateRangePickerProps; ref: HTMLButtonElement; stylesNames: DateRangePickerStylesNames; }>; export declare const DateRangePicker: import("@mantine/core").MantineComponent<{ props: DateRangePickerProps; ref: HTMLButtonElement; stylesNames: DateRangePickerStylesNames; }>; export declare namespace DateRangePicker { type Props = DateRangePickerProps; type StylesNames = DateRangePickerStylesNames; type Factory = DateRangePickerFactory; } //# sourceMappingURL=DateRangePicker.d.ts.map