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.

47 lines (43 loc) 1.49 kB
import React from 'react'; import { DayPickerRangeProps, DateRange } from 'react-day-picker'; import { FieldError } from 'react-hook-form'; interface CalendarRootRangeProps extends DayPickerRangeProps { 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; } declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLInputElement>>; export { type DateRangePickerProps, DateRangePicker as default };