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 Picker

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

View as MarkdownAsk ChatGPT

Installation

npx shadcn@latest add @preskok/date-picker

Usage

import { parseDate } from "@internationalized/date"

import {
  DatePicker,
  DatePickerTrigger,
} from "@/components/ui/preskok-ui/date-picker"
import { Label } from "@/components/ui/preskok-ui/field"

export function Example() {
  return (
    <DatePicker defaultValue={parseDate("2024-01-20")}>
      <Label>Pick a date</Label>
      <DatePickerTrigger />
    </DatePicker>
  )
}

Props

  • popover: PopoverProps (without children) — Desktop overlay options.
  • Inherits all react-aria-components DatePicker props.
  • Compose field content using Label, DatePickerTrigger, and optional FieldError.

Features

  • Responsive overlay: popover on desktop, modal on mobile
  • Keyboard and screen reader support
  • Validation and error messaging

Examples

Basic

Controlled

Disabled

Validation

Date Field

Input for entering and editing a date via segmented fields.

Date Range Picker

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

On this page

Installation
Usage
Props
Features
Examples
Basic
Controlled
Disabled
Validation