UNPKG

react-next-dates

Version:

Simple and Customizable DatePicker, DateRangePicker and TimePicker for React.

15 lines (14 loc) 674 B
import React from 'react'; import { Locale } from 'date-fns'; import { NullableDateChangeHandler } from '../index'; export interface UseDateInputParams { locale: Locale; date?: Date | null; format?: string; placeholder?: string; onChange?: NullableDateChangeHandler; } export declare type UseDateInputValue = Required<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'type' | 'value' | 'placeholder' | 'onChange' | 'onBlur' | 'onFocus'>> & { readOnly?: boolean; }; export default function useDateInput({ locale, date, format, placeholder, onChange, }: UseDateInputParams): UseDateInputValue;