UNPKG

@start-base/react-form-elements

Version:

Simplify form elements and form management. Selection of user friendly inputs and wide customization abilities to match your design and functionality.

48 lines (44 loc) 1.5 kB
import React, { JSX } from 'react'; import { PropsRange, DateRange } from 'react-day-picker'; import { FieldError } from 'react-hook-form'; interface CalendarRootRangeProps extends PropsRange { numberOfMonths?: number; classNames?: Partial<Record<string, string>>; calendarClassName?: string | null; className?: string; disabled?: boolean; error?: boolean | string | { message?: string; } | null; } interface DateRangePickerProps extends CalendarRootRangeProps { name: string; onChange: (event: { target: { name: string; value: DateRange | undefined; }; }) => void; error?: boolean | string | { message?: string; } | null | undefined | FieldError; label?: string | null; placeholder?: string | null; value?: DateRange; inputClassName?: string | null; numberOfMonths?: number; separator?: string; labelClassName?: string | null; errorClassName?: string | null; calendarClassName?: string | null; format?: string; prepend?: React.ReactNode | JSX.Element | null; prependClassName?: string | null; append?: React.ReactNode | JSX.Element | null; appendClassName?: string | null; disableShrink?: boolean; disabled?: boolean; locale?: any; } declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLInputElement>>; export { type DateRangePickerProps, DateRangePicker as default };