import * as React from 'react'; import { TextFieldProps } from '@mui/material/TextField'; import { ComponentsOverrides } from '@mui/material/styles'; import { CommonInputProps } from './CommonInputProps'; /** * Form input to edit a Date string value in the "YYYY-MM-DD" format (e.g. '2021-06-23'). * * Renders a date picker (the exact UI depends on the browser). * * @example * import { Edit, SimpleForm, DateInput } from 'react-admin'; * * const PostEdit = () => ( * * * * * * ); * * @example * // If the initial value string contains more than a date (e.g. an hour, a timezone), * // these details are ignored. * * // The input will display '2021-09-11' regardless of the browser timezone. * * @example * // If the initial value is a Date object, DateInput converts it to a string * // and ignores the timezone. * * // The input will display '2021-09-11' regardless of the browser timezone. * * @example * // If you want to manipulate the value from the field to adjust its timezone, use the format prop * new Date(value).toISOString().split("T")[0} /> * // The input will display the UTC day regardless of the browser timezone. * * @example * // If you want the returned value to be a Date, you must pass a custom parse method * to convert the form value (which is always a date string) back to a Date object. * new Date(val)} /> */ export declare const DateInput: (props: DateInputProps) => React.JSX.Element; export type DateInputProps = CommonInputProps & Omit; declare const PREFIX = "RaDateInput"; declare module '@mui/material/styles' { interface ComponentNameToClassKey { [PREFIX]: 'root'; } interface ComponentsPropsList { [PREFIX]: Partial; } interface Components { [PREFIX]?: { defaultProps?: ComponentsPropsList[typeof PREFIX]; styleOverrides?: ComponentsOverrides>[typeof PREFIX]; }; } } export {}; //# sourceMappingURL=DateInput.d.ts.map