UNPKG

@tiller-ds/formik-elements

Version:

Formik elements module of Tiller Design System

29 lines (28 loc) 1.61 kB
/// <reference types="react" /> import { DateRangeInputProps } from "@tiller-ds/date"; declare type DateRangeInputOnlyPropsUnion = "name" | "onChange" | "onBlur" | "error" | "start" | "end"; export declare type DateRangeInputFieldProps = { /** * Allows the clear button (x) to be shown when a value is present in the field. * On by default. */ allowClear?: boolean; /** * The accessor value for the ending date (for validation, fetching, etc.). * Name accessor represents start and end dates combined ('start end'). * 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")'. */ end: string; /** * The accessor value for the starting date (for validation, fetching, etc.). * Name accessor represents start and end dates combined ('start end'). * 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")'. */ start: string; } & Omit<DateRangeInputProps, DateRangeInputOnlyPropsUnion>; export default function DateRangeInputField({ start, end, allowClear, ...props }: DateRangeInputFieldProps): JSX.Element; export {};