@mui/x-date-pickers-pro
Version:
The Pro plan edition of the MUI X Date and Time Picker components.
40 lines • 1.57 kB
text/typescript
import * as React from 'react';
import { PickerRangeValue, PickerValidValue, PickerValue } from '@mui/x-date-pickers/internals';
import { FieldRef, PickerFieldSlotProps } from '@mui/x-date-pickers/models';
import type { UseMultiInputRangeFieldTextFieldProps } from "../hooks/useMultiInputRangeField/index.mjs";
export type { FieldRangeSection } from '@mui/x-date-pickers/internals';
export type FieldType = 'single-input' | 'multi-input';
/**
* Props the `textField` slot of the multi input field can receive when used inside a picker.
*/
export type MultiInputFieldSlotTextFieldProps = UseMultiInputRangeFieldTextFieldProps<{
label?: React.ReactNode;
focused?: boolean;
}>;
/**
* Props the `root` slot of the multi input field can receive when used inside a picker.
*/
export interface MultiInputFieldSlotRootProps {
onBlur?: React.FocusEventHandler;
}
export interface MultiInputFieldRefs<TValue extends PickerValidValue = PickerValue> {
/**
* The ref object used to interact with the start field imperatively.
*/
startFieldRef?: React.Ref<FieldRef<TValue> | null>;
/**
* The ref object used to interact with the end field imperatively.
*/
endFieldRef?: React.Ref<FieldRef<TValue> | null>;
}
export interface RangeFieldSeparatorProps {
/**
* String displayed between the start and the end dates.
* @default "–"
*/
dateSeparator?: string;
}
/**
* Props the `slotProps.field` of a range picker component can receive.
*/
export type PickerRangeFieldSlotProps = PickerFieldSlotProps<PickerRangeValue> & RangeFieldSeparatorProps;