UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

37 lines 1.6 kB
import { DatePickerBaseProps } from '@mantine/dates'; import { DateRangePickerPreset } from './DateRangePickerPresetSelect'; import { EditableDateRangePickerProps } from './EditableDateRangePicker'; export type DateRangePickerValue = [Date | null, Date | null]; export interface DateRangePickerInlineCalendarProps extends Pick<EditableDateRangePickerProps, 'startProps' | 'endProps'> { /** * Initial selected range */ initialRange: DateRangePickerValue; /** * Function called when the user applies the new date range * * @param range the newly selected dates */ onApply: (range: DateRangePickerValue) => void; /** * Function called when the user click on the cancel button */ onCancel: () => void; /** * The presets to display * * @default {} * @example * { * january: {label: 'January', range: [new Date(2022, 0, 1), new Date(2022, 0, 31)]}, * february: {label: 'February', range: [new Date(2022, 1, 1), new Date(2022, 1, 28)]} * } */ presets?: Record<string, DateRangePickerPreset>; /** * Props for RangeCalendar displayed in the popover */ rangeCalendarProps?: Omit<DatePickerBaseProps, 'value' | 'onChange' | 'isDateInRange' | 'isDateFirstInRange' | 'isDateLastInRange'>; } export declare const DateRangePickerInlineCalendar: ({ initialRange, onApply, onCancel, presets, startProps, endProps, rangeCalendarProps, }: DateRangePickerInlineCalendarProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=DateRangePickerInlineCalendar.d.ts.map