@tiller-ds/formik-elements
Version:
Formik elements module of Tiller Design System
20 lines (19 loc) • 983 B
TypeScript
/// <reference types="react" />
import { DateInputProps } from "@tiller-ds/date";
declare type DateInputOnlyPropsUnion = "value" | "onChange" | "onBlur" | "error";
export declare type DateInputFieldProps = {
/**
* The accessor value for the date input field component (for validation, fetching, etc.).
* The accepted values inferred from the name are either undefined, null, a string in a 'yyyy-mm-dd' format or a Date type.
* If string is given, the component itself makes sure to convert the string into a Date format.
* Examples of accepted Date format: 'new Date()', 'new Date("2019-01-20")'.
*/
name: string;
/**
* Allows the clear button (x) to be shown when a value is present in the field.
* On by default.
*/
allowClear?: boolean;
} & Omit<DateInputProps, DateInputOnlyPropsUnion>;
export default function DateInputField({ name, allowClear, ...props }: DateInputFieldProps): JSX.Element;
export {};