Hero Ui

DateRangePicker

Forms

About

Composable date range picker built on React Aria DateRangePicker with DateField and RangeCalendar composition.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds DateRangePicker to your project and fits it to your theme.

Code

How DateRangePicker is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { DateRangePicker } from "@/components/ui/heroui-date-range-picker";

function CustomIcon() {
  return (
    <svg aria-hidden="true" height="1em" viewBox="0 0 24 24" width="1em">
      <path d="M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm13 8H4v8a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-8ZM5 6a1 1 0 0 0-1 1v1h16V7a1 1 0 0 0-1-1H5Zm3 7h3v3H8v-3Z" fill="currentColor" />
    </svg>
  );
}

export default function CustomIndicatorDemo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
      <DateRangePicker label="Trip dates" customIndicator={<CustomIcon />} description="Replace the default calendar icon by passing custom children." />
    </div>
  );
}

export { CustomIndicatorDemo };

More by Hero Ui

View all
  • DatePicker

    DatePicker

    473
  • Chip

    Chip

    449
  •  The Pagination

    The Pagination

    368
  • HeroUI Table

    HeroUI Table

    124
  • HeroUI Color Picker

    HeroUI Color Picker

    115
  • Skeleton

    Skeleton

    108
  • HeroUI Disclosure Group

    HeroUI Disclosure Group

    98
  • HeroUI AlertDialog

    HeroUI AlertDialog

    85

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19