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

Root

The Root component is the root component of the Calendar.

Root enables you to re-compose the Calendar with additional UI elements, such as shortcut lists or additional branding. Refer to Composition.

Example

Build your own datepicker
with use-date-input
2021
June
Su
Mo
Tu
We
Th
Fr
Sa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Props

Prop NameTypeIs RequiredDefault ValueDescription
classNamestringoptionalClass name of root element

Importing

It can be imported as either the base component

import { Root } from "@use-date-input/core";

or as an overridable component that can be replaced through the components prop in CalendarProvider.
Refer to How to replace UI components.

import { CustomisableMonthRoot } from "@use-date-input/core";

If providing your own component, it can be useful to import the base component and use it within your composition.