Loading
Loading
Loading
mobile footer

Build the Interaction Layer Your Website is Missing.

Browse All EffectsBrowse All EffectsBrowse All EffectsUpgrade to ProUpgrade to ProUpgrade to Pro

70+ effects free, forever. No credit card.

© 2026 Hyperiux. All Rights Reserved.

AI Component CatalogueHey AI, Learn About Us
Platform

Vault

  • Documentation
  • Pricing
  • Blog
  • Community
  • NPM
  • MCP

Categories

  • All Effects
  • WebGL
  • Text
  • Backgrounds
  • Buttons
  • Carousels
  • Scroll
  • Components
  • Navigation
  • Cursor
  • Transitions
  • Loaders

Documents

  • Introduction
  • Installation
  • CLI
  • Dependencies
  • License

Legal

  • License Agreement
  • Terms of Service
  • Privacy Policy
  • Refund Policy
Socials
  • Twitter / X
  • LinkedIn
  • GitHub
  • Instagram
Contact Us
  • hello@hyperiux.com
New effects, in your inbox

Every new drop, plus the occasional behind-the-scenes build. No spam. Unsubscribe anytime.

All Effects
Featured ComponentsText AnimationsAnimated BackgroundsAnimated ButtonsCarousel EffectsScroll EffectsCreative ComponentsNavigationsCursor EffectsTransitionsLoadersWebGL & 3D Effects
Templates
IntroductionInstallationCLIDependenciesLicense
PricingBlogGithubNPMMCP Doc
Loading
Home/effects/Date Picker Component

Date Picker Component

An animated single-date or date-range picker with smooth calendar transitions, a rolling trigger label on hover, gliding hover highlights, and month and year navigation.

@base-ui/reactclass-variance-authoritydate-fnslucide-reactmotionreact-day-pickertailwind-merge
DemoDemoDemo

Tune the Real Props

Overview

Date Picker opens a calendar popup from its trigger with a scale or fade entrance, and picks either a single date or a date range (the default). In range mode, wide screens (768px and up) show two months side by side, and the days between the start and the hovered end are previewed while the end is being chosen. The trigger label rolls up to a copy of itself on hover and shows the chosen date or range. Month changes can slide in the direction of travel or fade, while a shared highlight glides between dates so users can follow where they are. Month and year selectors let users jump directly instead of clicking repeatedly.


Theme and Interaction Customisation

Configure single or range selection, the trigger icon, date format, the header (month and year, month only, year only, or a plain label) with how many years the year list covers, close on select, filled or outlined hover highlight, neighbouring-month days, a fixed six-week grid, highlighting today, disabling past dates, and whether the week starts on Sunday or Monday. Motion settings include the rolling label, a popup that grows from behind the trigger with a scale or fade entrance and adjustable start scale, slide, fade, or instant month changes with a slide distance, sliding arrows, and slide or fade hover highlights with glide duration and bounce. Seven themes come in light or dark mode.


Example Production Use Case

A SaaS onboarding form can use Date Picker in single mode to collect a preferred start date. Past dates are disabled, and the trigger shows the chosen day so customers can confirm it at a glance.

A reporting dashboard can let analysts jump straight to a month and year, then pick the day whose activity they want to review, without typing an ambiguous date string.

An ecommerce checkout can offer it for preferred delivery dates, while the store’s availability rules decide which days are actually bookable.


Best Used For

  • Appointment and consultation forms.
  • SaaS onboarding and account scheduling.
  • Reporting dashboards that review a specific day.
  • Event registrations.
  • Project due dates and milestones.
  • Ecommerce delivery or collection dates.
  • Administrative date inputs for records and deadlines.

Not For

Date Picker selects one date or one continuous range, so several unrelated dates need a multi-date calendar.

If users only need a year or a few preset periods, a simple select field is faster than a full calendar.

It isn’t a scheduling engine. Picking a day doesn’t confirm availability, so bookings with precise times need time controls and timezone-aware logic.


Performance Budget

Keep opening, month navigation, and selection instant. Use lightweight transitions, use fixed six-week mode to avoid height shifts, and cancel in-progress animations during rapid navigation. Don’t animate anything while the calendar is closed.


Accessibility and Mobile

Label the trigger and navigation controls, announce full dates and states, support keyboard movement between days, and return focus when the popup closes. Today, selection, focus, and hover must differ by more than colour. On mobile, use comfortable date cells and keep the popover inside the viewport, and with reduced motion replace slides, gliding, and rolling text with instant changes.


Common Mistakes

  • Letting month navigation overwrite the user’s chosen date.
  • Displaying or storing dates in ambiguous formats.
  • Mishandling short months and leap years.
  • Styling today and the selected date the same way.
  • Letting an older month’s transition play after a newer one.
  • Expecting start scale, slide distance, or hover bounce to affect unsupported modes.
  • Treating a selected date as confirmed availability.
  • Forgetting focus management when opening and closing the calendar.
  • Ignoring reduced-motion preferences.

Changelog

Fixed the build failing on Next.js projects with cacheComponents (the default for new apps): the calendar no longer reads today's date while rendering closed.
Initial release

API Reference

PropTypeDefaultDescription
themestringvscodeColour palette, calendar included. The selected day and range take its primary colour.
modestringdarkLight or dark version of the palette. Starts dark.
selectionModestringrangePick one date, or a start and an end date. A range shows two months side by side from tablet up.
showIconbooleantrueShows a calendar icon in the trigger button.
rollingTextbooleantrueThe button label rolls to a second copy on hover.
dateFormatstringPPPHow the chosen date is written in the trigger.
fromBehindbooleantrueThe calendar grows out from behind the trigger instead of appearing below it.
contentAnimationstringscaleHow the calendar appears: scales and fades, or only fades.
startScalenumber0.9Size the calendar starts from when it opens, as a fraction of full size.
closeOnSelectbooleantrueCloses the calendar as soon as a date is picked. For a range, once both ends are picked.
captionLayoutstringdropdownWhat the calendar header shows: month and year dropdowns, one of them, or a plain label.
yearsBeforenumber10How many years before this one the year dropdown goes back. Needs a Header with a year dropdown.
yearsAfternumber10How many years after this one the year dropdown goes forward. Needs a Header with a year dropdown.
monthAnimationstringslideHow the days change when you move to another month.
monthSlideDistancenumber40How far the days slide when the month changes, in pixels. Needs Month animation set to Slide + fade.
slideArrowsbooleantrueThe month arrows nudge in the direction they move.
hoverVariantstringfilledStyle of the day highlight: filled or outline.
hoverAnimationstringslideHow the highlight moves between days: slides or fades.
hoverDurationnumber0.25How long the highlight takes to glide between days, in seconds.
hoverBouncenumber0.15How much the highlight overshoots when gliding. 0 is no bounce.
weekStartsOnstring0First day of the week shown in the calendar.
onlyCurrentMonthbooleantrueHides days that belong to the previous or next month.
fixedWeeksbooleantrueAlways shows six weeks so the calendar keeps the same height.
disablePastbooleanfalseGreys out dates before today so they can't be picked.
highlightTodaybooleanfalseGives today's date its own highlight.

Questions, Answered.

What is Date Picker?

Date Picker is an animated React component that lets users select a single date or a date range through a popup calendar, with month and year navigation, animated hover and month transitions, and configurable calendar settings.

Does Date Picker support date ranges?

Yes. Range selection is the default: pick a start and an end, with the days in between previewed as you hover, and two months shown side by side on screens 768px and wider. Set selectionMode to single for one date. Several unrelated dates are not supported.

Can users jump directly to a month or year?

Yes. The header can show month and year dropdowns, so users choose a period directly instead of clicking the arrows repeatedly.

Can I change the displayed date format?

Yes. A date-fns format string controls how the selected date appears in the trigger, from written dates to compact numeric formats.

Can Date Picker disable past dates?

Yes. Disable past dates blocks days before today while leaving today and future dates available.

Can Date Picker be used with Next.js?

Yes. Calendar navigation, selection, and animation run inside a client-side component in React and Next.js applications.

View MoreView More

Request a Custom Animation

Need a custom effect? Tell us what to create.

Related Effects

Explore All EffectsExplore All EffectsExplore All Effects
Theme Switch Component
Pro
@base-ui/reactclass-variance-authoritygsap

Theme Switch Component

Components

Sidebar Component
@base-ui/reactclass-variance-authoritylucide-react

Sidebar Component

Components

Command Component
Pro
@base-ui/reactclass-variance-authoritycmdk

Command Component

Components