UNPKG

@mui/x-date-pickers-pro

Version:

The Pro plan edition of the MUI X Date and Time Picker components.

33 lines 1.96 kB
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/internals'; import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps } from "../DesktopDateRangePicker/index.js"; import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from "../MobileDateRangePicker/index.js"; import { ValidateDateRangeProps } from "../validation/index.js"; export interface DateRangePickerSlots extends DesktopDateRangePickerSlots, MobileDateRangePickerSlots {} export interface DateRangePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateRangePickerSlotProps<TEnableAccessibleFieldDOMStructure>, MobileDateRangePickerSlotProps<TEnableAccessibleFieldDOMStructure> {} export interface DateRangePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends DesktopDateRangePickerProps<TEnableAccessibleFieldDOMStructure>, MobileDateRangePickerProps<TEnableAccessibleFieldDOMStructure> { /** * CSS media query when `Mobile` mode will be changed to `Desktop`. * @default '@media (pointer: fine)' * @example '@media (min-width: 720px)' or theme.breakpoints.up("sm") */ desktopModeMediaQuery?: string; /** * Overridable component slots. * @default {} */ slots?: DateRangePickerSlots; /** * The props used for each component slot. * @default {} */ slotProps?: DateRangePickerSlotProps<TEnableAccessibleFieldDOMStructure>; /** * If `true`, the Picker will close after submitting the full date. * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop). */ closeOnSelect?: boolean; } /** * Props the field can receive when used inside a Date Range Picker (<DateRangePicker />, <DesktopDateRangePicker /> or <MobileDateRangePicker /> component). */ export type DateRangePickerFieldProps = ValidateDateRangeProps & BaseSingleInputFieldProps;