Back to blocks
BlockDashboard / ApplicationFree

Date Range Picker with Presets React component

A dashboard date range control: a trigger that shows the range and its comparison, a popover with presets, typed start and end dates, a two-month calendar where the range previews as you hover, future days disabled, a compare-to period drawn under the calendar, and Apply updating the numbers and chart behind it.

About the Date Range Picker with Presets component

Date Range Picker with Presets is the date control dashboards need: common ranges in one click, a two-month calendar for anything else, and a comparison period so every number has context.

Picking feels direct. Click a start day and the range follows your pointer until you click the end, future days can't be chosen, and the comparison period is drawn right under the calendar. Typed dates work too, and Apply updates everything behind the picker.

When to use it

Use it at the top of analytics dashboards, reports, billing history and anywhere data is filtered by date.

To pick a single date in a form, a simple date picker is enough.

Installation

Add the Date Range Picker with Presets component to your project with the shadcn CLI. It lands in components/date-range-picker-presets.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/date-range-picker-presets

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

More Dashboard / Application components

Record Detail Drawer
Free
Spotlight Search Panel
Free
Account Menu Dropdown
Free
Brand Color Settings Panel
Free
Upload Queue Panel
Free
Checkbox Selection Cards
Free