import { DateFieldProps } from "@trackunit/react-form-components"; import { ReactElement } from "react"; import { FieldValues, RegisterOptions, UseFormRegister, UseFormSetValue } from "react-hook-form"; import { FormGroupExposedProps } from "./types"; export interface DateCustomFieldProps extends Omit, FormGroupExposedProps { /** * A id for the field * * @memberof DateCustomFieldProps */ id: string; /** * Used for field validation by React Hook Form library it dynamically set the value of a registered field and have the options to validate and update the form state. At the same time, it tries to avoid unnecessary rerender. * * @memberof DateCustomFieldProps */ setValue?: UseFormSetValue; /** * This method allows you to register an input or select element and apply validation rules to React Hook Form. Validation rules are all based on the HTML standard and also allow for custom validation methods. * * @memberof DateCustomFieldProps */ register?: UseFormRegister; /** * Validation rules that can be passed to the field, they can be pass along with error messages. Rules are described here https://react-hook-form.com/api/useform/register * * @memberof DateCustomFieldProps */ validationRules?: RegisterOptions; /** * If a value is set, the field is rendered in its invalid state. * * @memberof DateCustomFieldProps */ errorMessage?: string; /** * A boolean flag to set a component into invalid state * which means that selected value is breaking validation rules * * @memberof DateCustomFieldProps */ isInvalid?: boolean; /** * The label for the Date. */ title?: string; } /** * A component that can be used to render a date field * * @param props DateCustomFieldProps - options for the component * @returns {ReactElement }ReactElement - a component that can be used to render a date field */ export declare const DateCustomField: (props: DateCustomFieldProps) => ReactElement;