import * as React from 'react'; import { SxProps } from '@mui/system'; import { SlotComponentProps } from '@mui/base'; import { Theme } from '@mui/material/styles'; import { TimezoneProps } from '@mui/x-date-pickers/models'; import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlotsComponent, DayCalendarSlotsComponentsProps, PickersArrowSwitcherSlotsComponent, PickersArrowSwitcherSlotsComponentsProps, PickerSelectionState, PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponentsProps, DayCalendarProps, ExportedUseViewsOptions, UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals'; import { DateRange, DayRangeValidationProps } from '../internals/models'; import { DateRangeCalendarClasses } from './dateRangeCalendarClasses'; import { DateRangePickerDay, DateRangePickerDayProps } from '../DateRangePickerDay'; import { UseRangePositionProps } from '../internals/hooks/useRangePosition'; export declare type DateRangePosition = 'start' | 'end'; export interface DateRangeCalendarSlotsComponent extends PickersArrowSwitcherSlotsComponent, Omit, 'Day'>, PickersCalendarHeaderSlotsComponent { /** * Custom component for day in range pickers. * Check the [DateRangePickersDay](https://mui.com/x/api/date-pickers/date-range-picker-day/) component. * @default DateRangePickersDay */ Day?: React.ElementType>; } export interface DateRangeCalendarSlotsComponentsProps extends PickersArrowSwitcherSlotsComponentsProps, Omit, 'day'>, PickersCalendarHeaderSlotsComponentsProps { day?: SlotComponentProps & { day: TDate; selected: boolean; }>; } export interface ExportedDateRangeCalendarProps extends ExportedDayCalendarProps, BaseDateValidationProps, DayRangeValidationProps, TimezoneProps, Pick, 'autoFocus'> { /** * If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date. * @default false */ disableAutoMonthSwitching?: boolean; /** * Default calendar month displayed when `value={[null, null]}`. */ defaultCalendarMonth?: TDate; /** * If `true`, the picker and text field are disabled. * @default false */ disabled?: boolean; /** * Make picker read only. * @default false */ readOnly?: boolean; /** * Disable heavy animations. * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent) */ reduceAnimations?: boolean; /** * Callback fired on month change. * @template TDate * @param {TDate} month The new month. */ onMonthChange?: (month: TDate) => void; /** * The number of calendars to render. * @default 2 */ calendars?: 1 | 2 | 3; /** * Position the current month is rendered in. * @default 1 */ currentMonthCalendarPosition?: 1 | 2 | 3; /** * If `true`, editing dates by dragging is disabled. * @default false */ disableDragEditing?: boolean; } export interface DateRangeCalendarProps extends ExportedDateRangeCalendarProps, UseRangePositionProps { /** * The selected value. * Used when the component is controlled. */ value?: DateRange; /** * The default selected value. * Used when the component is not controlled. */ defaultValue?: DateRange; /** * Callback fired when the value changes. * @template TDate * @param {DateRange} value The new value. * @param {PickerSelectionState | undefined} selectionState Indicates if the date range selection is complete. */ onChange?: (value: DateRange, selectionState?: PickerSelectionState) => void; className?: string; classes?: Partial; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps; /** * Overridable components. * @default {} * @deprecated Please use `slots`. */ components?: DateRangeCalendarSlotsComponent; /** * The props used for each component slot. * @default {} * @deprecated Please use `slotProps`. */ componentsProps?: DateRangeCalendarSlotsComponentsProps; /** * Overridable component slots. * @default {} */ slots?: UncapitalizeObjectKeys>; /** * The props used for each component slot. * @default {} */ slotProps?: DateRangeCalendarSlotsComponentsProps; } export interface DateRangeCalendarOwnerState extends DateRangeCalendarProps { isDragging: boolean; } export declare type DateRangeCalendarDefaultizedProps = DefaultizedProps, 'reduceAnimations' | 'calendars' | 'disableDragEditing' | keyof BaseDateValidationProps>;