import { UseFormSetValue, UseFormTrigger } from 'react-hook-form'; /** * Hook that provides functionality for building a custom date picker with * theme-able styles. * * Exposes refs used for popup pickers positioned with `createPortal`. * * Takes optional props to integrate with `react-hook-form`. * * Takes optional `Intl.DateTimeFormat` formatter to allow custom formatting * of dates. * * @example * ```tsx * * const customDateFormatter = new Intl.DateTimeFormat('en', { * day: 'numeric', * month: 'long', * year: 'numeric', * }); * * const { * portalRef, * inputRef, * selectedDate, * selectorShown, * setSelectorShown, * currentMonth, * setCurrentMonth, * dropdownPosition, * isSameDate, * tomorrow, * offset, * year, * month, * totalDays, * dayLabels, * totalCells, * handleSelectDate, * } = useDatePicker({ name, setValue, trigger, customDateFormatter }); * ``` */ export default function useDatePicker({ name, setValue, trigger, customDateFormatter, }: { name?: string; setValue?: UseFormSetValue; trigger?: UseFormTrigger; customDateFormatter?: Intl.DateTimeFormat; }): { portalRef: import("react").RefObject; inputRef: import("react").RefObject; selectedDate: Date | null; selectorShown: boolean; setSelectorShown: import("react").Dispatch>; currentMonth: Date; setCurrentMonth: import("react").Dispatch>; dropdownPosition: { top: number; left: number; width: number; }; isSameDate: (a: Date, b: Date) => boolean; offset: number; totalDays: number; tomorrow: Date; year: number; month: number; dayLabels: string[]; totalCells: number; handleSelectDate: (date: Date) => void; }; //# sourceMappingURL=use-date-picker.d.ts.map