Docs
Date Input
Date Input

A comprehensive date picker component with calendar integration, validation, theming options, and Zod schema support for forms.

Select the date of your event

Overview

The Date Input component provides an intuitive date selection experience with calendar popup, validation, and accessibility features, making it essential for booking systems, form fields, and any date-driven functionality. It supports both controlled and uncontrolled modes with flexible date constraints and Zod schema validation, ensuring reliable date handling across your application. Perfect for creating consistent, user-friendly date selection interfaces with modern design patterns.

Installation

pnpm dlx shadcn@latest add https://deltacomponents.dev/r/date-input.json

Usage

"use client"
 
import { DateInput } from "@/registry/inputs/date-input"
 
export function Component() {
  return (
    <DateInput
      label="Birth Date"
      name="birthDate"
      description="Select your date of birth"
      placeholder="Pick a date"
      required
    />
  )
}

API Reference

Props

PropTypeDefaultDescription
labelstring-Label for the date field (required)
namestring-Name of the date field for form submission (required)
descriptionstringundefinedDescription text below the label
hintstringundefinedHint text below the date picker
errorstringundefinedError message to display
requiredbooleanfalseWhether the field is required
pendingbooleanfalseWhether the field is in a loading state
defaultValueDateundefinedDefault selected date (uncontrolled)
valueDateundefinedControlled selected date
placeholderstring"Select a date"Placeholder text when no date is selected
dateFormatstring"PPP"Format to display the selected date
disabledbooleanfalseWhether the date picker is disabled
minDateDateundefinedMinimum date that can be selected
maxDateDateundefinedMaximum date that can be selected
idstringnameID for the date picker element
variant"default" | "pill""default"Date picker visual variant
coloredBorderbooleanfalseWhether to show colored border (pill variant)
labelVariant"default" | "muted""default"Label text styling variant
containerClassNamestring""CSS classes for the container
triggerClassNamestring""CSS classes for the trigger button
labelClassNamestring""CSS classes for the label
schemaZodType<Date>undefinedZod schema for validation
onValidate(isValid: boolean, value: Date, error?: string) => voidundefinedValidation callback
onValueChange(value: Date | undefined) => voidundefinedCallback when date changes

Examples