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

AnimatedMonthGroup

The AnimatedMonthGroup component animates it's children based on the change of the visibleFromDate and refs, applied to the first (firstColumnRef). and last column (groupRef).

In the default implementation, AnimatedMonthGroup is the parent of AnimatedMonth and is used to manage scroll movement between columns based on the changes to visibleFromDate.

Example

Build your own datepicker
with use-date-input
Build your own datepicker
with use-date-input
Build your own datepicker
with use-date-input

Props

Prop NameTypeIs RequiredDefault ValueDescription
childrenelementoptionalChildren
firstColumnRefobjectrequiredRef to the first column
groupRefobjectrequiredRef to the MonthGroup
visibleFromDateobjectrequiredVisible from date, used to control animation between columns and MonthGroup

Importing

It can be imported as either the base component

import { AnimatedMonthGroup } 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 { CustomisableAnimatedMonthGroup } 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.