use-date-input - Build Your Own Date Picker
Getting StartedStateThemingCompositionDate FrameworksLocalization
Components
Hooks
AnimatedGroupAnimatedMonthGroupCalendarCalendarProviderClickOutsideDayDayOfWeekHeaderHomeMonthMonthGroupPopperPopperExamplePropsRootWeekWeekHeaderuseCalendarDispatchuseCalendarPropsuseCalendarStateuseDateAPIuseDateInputuseDateRangeInput

Popper

Popper is an optional component that has been provided to help build datepickers which open within an overlay (portal).

The hooks, useDateInput and useDateRange support an optional popper that you must render yourself and then apply the getPopperProps to.
For further examples of this Popper in use with the use-date-input hooks, refer to useDateInput and useDateRange.

Otherwise, you can use your own favourite Popper implementation in place of Popper.

Example

Props

Prop NameTypeIs RequiredDefault ValueDescription
anchorElfunc or objectoptionalAnchor element
childrennodeoptionalPopper content
ignoreClickOutsideRefsarrayoptionalArray of refs, will not close the Popper, if clicked
onClickOutsidefuncoptionalCallback on click outside
onEscapeKeyfuncoptionalCallback on escape key press
openbooloptionalOpen/close popper