Introduction
Installation
Next.jsViteLaravelReact RouterRemixAstroTanStack StartTanStack RouterManual InstallationMCP
All componentsTheme
FieldFormInputText FieldTextareaSearch FieldInput OTPNumber FieldNumber FormatSliderCheckboxSwitchRadioSelectCombo BoxList BoxChoice BoxMulti SelectToken FieldNewTag FieldTag GroupCalendarDate FieldDate PickerDate Range PickerRange CalendarTime FieldColor PickerColor FieldColor AreaColor SliderColor SwatchColor Swatch PickerColor ThumbColor WheelDrop ZoneFile Trigger
ButtonButton GroupToggleToggle GroupPreskok Auth Button
EditorHeadingLinkTextKeyboard
CardContainerGrid ListResizableTableTreeSeparatorDescription ListScroll AreaShow MoreToolbar
BreadcrumbsNavbarPaginationTabsSidebar
DialogModalDrawerPopoverPreview TriggerNewSheetTooltipContext MenuDropdownCommandCommand MenuDisclosureMenu
ToastProgress BarProgress CircleMeterLoaderSkeletonNoteBadge
Chart (helpers)Area ChartBar ChartLine ChartPie ChartExperimental ChartsNewExperimental Radial ChartNewExperimental Radar ChartNewBar ListTracker
Async ImageAvatarCarouselPreskok Icon
Forms

Date Range Picker

Pick a start and end date with a responsive calendar overlay.

View as MarkdownAsk ChatGPT

Installation

npx shadcn@latest add @preskok/date-range-picker

Usage

import { parseDate } from "@internationalized/date"

import {
  DateRangePicker,
  DateRangePickerTrigger,
} from "@/components/ui/preskok-ui/date-range-picker"
import { Label } from "@/components/ui/preskok-ui/field"

export function Example() {
  return (
    <DateRangePicker
      visibleDuration={{ months: 2 }}
      defaultValue={{
        start: parseDate("2024-02-10"),
        end: parseDate("2024-02-20"),
      }}
    >
      <Label>Date range</Label>
      <DateRangePickerTrigger />
    </DateRangePicker>
  )
}

Props

  • visibleDuration: DateDuration — Number of months shown.
  • pageBehavior: "visible" | "single" — Paging behavior for multi-month view.
  • popover: PopoverProps (without children) — Desktop overlay options.
  • Inherits all react-aria-components DateRangePicker props.
  • Compose field content using Label, DateRangePickerTrigger, and optional FieldError.

Features

  • Two inputs with separator
  • Responsive popover/modal overlay
  • Keyboard and screen reader support

Examples

Basic

Controlled

Disabled

Validation

Date Picker

A date picker with responsive popover/modal overlay and calendar.

Range Calendar

A calendar component for selecting date ranges.

On this page

Installation
Usage
Props
Features
Examples
Basic
Controlled
Disabled
Validation