---
title: Date Picker
description: A date picker component with range and presets.
component: true
source:
shadcn: true
---
## Installation
The Date Picker is built using a composition of the `` and the `` components.
See installation instructions for the [Popover](/docs/components/popover#installation) and the [Calendar](/docs/components/calendar#installation) components.
## Usage
```tsx
'use client'
import * as React from 'react'
import { format } from 'date-fns'
import { Calendar as CalendarIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import { Calendar } from '@/components/ui/calendar'
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
export function DatePickerDemo() {
const [date, setDate] = React.useState()
return (
)
}
```
See the [React DayPicker](https://react-day-picker.js.org) documentation for more information.
## Examples
### Date Picker
### Date Range Picker
### With Presets
### Form