date-picker-granularity

PreviousNext
Docs
takiexample

Preview

Loading preview…
registry/new-york/examples/date-picker-granularity.tsx
import { DatePicker } from "@/registry/new-york/ui/date-picker"

export default function DatePickerGranularity() {
  return (
    <div className="space-y-4">
      <DatePicker
        label="Date only"
        description="Year, month, and day."
        granularity="day"
      />
      <DatePicker
        label="Month and year"
        description="Month and year only."
        granularity="month"
      />
    </div>
  )
}

Installation

npx shadcn@latest add @taki/date-picker-granularity

Usage

import { DatePickerGranularity } from "@/components/date-picker-granularity"
<DatePickerGranularity />