BoundDateTimePicker

BoundDateTimePicker binds a MUI DateTimePicker component to the data object found in the nearest DataObjectProvider. All properties of the MUI DateTimePicker can be used except value, onChange and renderInput. The bound picker will always render a MUI TextField, but you can send props to the text field with the TextFieldProps property on the bound checkbox.

API

import { TextFieldProps } from "@mui/material";
import { DateTimePickerProps } from "@mui/x-date-pickers-pro";

export declare type BoundDateTimePickerProps = Omit<
  DateTimePickerProps<Date, Date>,
  "value" | "onChange" | "renderInput"
> & {
  field: string;
  TextFieldProps?: TextFieldProps;
};

export declare const BoundDateTimePicker: import("react").ForwardRefExoticComponent<
  Omit<
    DateTimePickerProps<Date, Date>,
    "onChange" | "value" | "renderInput"
  > & {
    field: string;
    TextFieldProps?: TextFieldProps | undefined;
  } & import("react").RefAttributes<HTMLInputElement>
>;

Last updated

Was this helpful?