use-date-input - Build Your Own Date Picker
Getting StartedStateThemingCompositionDate FrameworksLocalization
Components
Hooks
AnimatedGroupAnimatedMonthGroupCalendarCalendarProviderClickOutsideDayDayOfWeekHeaderHomeMonthMonthGroupPopperRootWeekWeekHeaderuseCalendarDispatchUsing the dispatcherUsing the helper APIuseCalendarPropsuseCalendarStateuseDateAPIuseDateInputuseDateRangeInput

useCalendarDispatch

useCalendarDispatch returns the configured reducers dispatcher, along with a helper API for common actions.

const {
dispatch,
mouseClickOutside,
navigateNext,
navigatePrevious,
selectDate,
setAnimating,
setEnableKeyboardNavigation,
setKeyboardCursor,
setMouseCursor,
setEndDate,
setStartDate,
setOpen,
setKeyPress,
setVisibleFromDate
} = useCalendarDispatch();

Using the dispatcher

Using the dispatcher we can dispatch any action to the reducers.

2021
June
Su
Mo
Tu
We
Th
Fr
Sa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Using the helper API

Using the dispatcher we can dispatch the most common actions, through helper methods.

2021
June
Su
Mo
Tu
We
Th
Fr
Sa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910