UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

26 lines 1.48 kB
import { FormItemProps } from 'dgz-ui/form'; import { FieldValues } from 'react-hook-form'; import { DateRangePickerProps } from '../datepicker'; /** * Props for the MyDateRangePicker component. * @template TFieldValues - The type of the form values. */ export type MyDateRangePickerProps<TFieldValues extends FieldValues> = FormItemProps<TFieldValues> & Omit<DateRangePickerProps, 'required'> & { required?: true; }; /** * MyDateRangePicker renders a date range selector integrated with react-hook-form. * * @template TFieldValues - Form values type used by react-hook-form. * @param control - The `react-hook-form` control object. * @param name - The name of the field in `react-hook-form`. * @param label - The label to display for the date range picker. * @param required - Whether the field is required. * @param rules - The `react-hook-form` validation rules. * @param format - The date format for display. * @param placeholder - The placeholder text when no date is selected. * @param props - DateRangePicker props and form item props. * @returns {JSX.Element | null} A date range picker integrated with react-hook-form, or null if name/control are missing */ export declare const MyDateRangePicker: <TFieldValues extends FieldValues>({ control, name, label, required, rules, placeholder, floatingError, ...props }: MyDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=MyDateRangePicker.d.ts.map