BoundDatePicker

BoundDatePicker binds a MUI DatePicker component to the data object found in the nearest DataObjectProvider. All properties of the MUI DatePicker 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 { DatePickerProps } from "@mui/x-date-pickers-pro";

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

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

Last updated

Was this helpful?