Build faster with Premium Chakra UI Components 💎

Learn more
Skip to Content
DocsShowcaseBlogGuides
Sponsor

Date Picker

Used to select dates or date ranges from a calendar.

SourceStorybookRecipe
AI TipWant to skip the docs? Use the MCP Server

Usage

import { DatePicker } from "@chakra-ui/react"
<DatePicker.Root>
  <DatePicker.Label />
  <DatePicker.Control>
    <DatePicker.Input />
    <DatePicker.IndicatorGroup>
      <DatePicker.Trigger>
        <LuCalendar />
      </DatePicker.Trigger>
    </DatePicker.IndicatorGroup>
  </DatePicker.Control>
  <Portal>
    <DatePicker.Positioner>
      <DatePicker.Content>
        <DatePicker.View view="day">
          <DatePicker.Header />
          <DatePicker.DayTable />
        </DatePicker.View>
        <DatePicker.View view="month">
          <DatePicker.Header />
          <DatePicker.MonthTable />
        </DatePicker.View>
        <DatePicker.View view="year">
          <DatePicker.Header />
          <DatePicker.YearTable />
        </DatePicker.View>
      </DatePicker.Content>
    </DatePicker.Positioner>
  </Portal>
</DatePicker.Root>

Date Value

Date values are provided using objects from @internationalized/date, which handles timezone-safe, locale-aware date handling.

This will be replaced by the Temporal API when it's widely supported in browsers.

Examples

Sizes

Use the size prop to change the size of the date picker.

Variants

Use the variant prop to change the visual style of the date picker.

Disabled

Use the disabled prop to prevent user interaction with the date picker.

Read Only

Use the readOnly prop to prevent modification while keeping the value visible.

Default View

Use the defaultView prop to set the initial calendar view to "day", "month", or "year".

Opens with month view

Default Value

Use the defaultValue prop to set the initially selected date.

Controlled

Use the value and onValueChange props to control the selected date.

Selected: 2026-01-26

Store

An alternative way to control the date picker is to use the RootProvider component and the useDatePicker store hook.

Selected: None

Range Selection

Set the selectionMode prop to "range" to allow selecting a start and end date.

Multiple Selection

Set the selectionMode prop to "multiple" to allow selecting multiple dates.

Select dates...

Month Picker

Set the defaultView and minView props to "month" to restrict the picker to month selection only.

Month Range

Set the selectionMode prop to "range" and minView to "month" to select a month range.

Year Picker

Set the defaultView and minView props to "year" to restrict the picker to year selection only.

Year Range

Set the selectionMode prop to "range" and minView to "year" to select a year range.

Min/Max

Use the min and max props to restrict date selection to a specific range.

Unavailable Dates

Use the isDateUnavailable prop to disable specific dates (e.g., weekends, holidays).

Formatting & Parsing

Use the format and parse props to control how dates are displayed and interpreted.

Localization

Use the locale prop to display the calendar in different languages and regional formats.

Button Trigger

Replace the default trigger with a styled custom button.

Outside Icon

Place the trigger icon outside the input field.

Input Group

Integrate with InputGroup for custom input layouts with start/end elements.

Clear Icon

Add a clear trigger to reset the selection.

Placement

Use the positioning prop to control the placement of the calendar popover.

Header Layout

Here's an example of customizing the header layout with RangeText and navigation buttons.

Month and Year Select

Render the DatePicker.MonthSelect and DatePicker.YearSelect components for quick month/year navigation.

Multiple Months

Use the numOfMonths prop to display multiple months side by side.

Presets

Render the DatePicker.PresetTrigger component to provide quick date selection options.

Presets Sidebar

Here's an example of a task-management style picker with presets sidebar and calendar side by side.

March 2026
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11

Today Button

Here's an example of adding a footer button to quickly jump to today's date.

With Time

Here's an example of combining date selection with a time input for datetime picking.

Form

Here's an example of integrating with native form validation.

React Hook Form

Here's an example of integrating with react-hook-form using the Controller pattern.

Fixed Weeks

Use the fixedWeeks prop to always display 6 weeks in the calendar, ensuring a consistent height regardless of the month.

Open on Click

Use the openOnClick prop to open the calendar when clicking the input field, removing the need for a separate trigger button.

Field

The DatePicker does not natively integrate with the Field component yet. Use Field.Context to wire up the field state manually. Native support will be added in a future version.

Props

Root

PropDefaultType
closeOnSelect true
boolean

Whether the calendar should close after the date selection is complete. This is ignored when the selection mode is `multiple`.

defaultView 'day'
DateView

The default view of the calendar

lazyMount false
boolean

Whether to enable lazy mounting

locale en-US
string

The locale (BCP 47 language tag) to use when formatting the date.

maxView 'year'
DateView

The maximum view of the calendar

minView 'day'
DateView

The minimum view of the calendar

outsideDaySelectable false
boolean

Whether day outside the visible range can be selected.

selectionMode 'single'
SelectionMode

The selection mode of the calendar. - `single` - only one date can be selected - `multiple` - multiple dates can be selected - `range` - a range of dates can be selected

skipAnimationOnMount false
boolean

Whether to allow the initial presence animation.

timeZone UTC
string

The time zone to use

unmountOnExit false
boolean

Whether to unmount on exit.

colorPalette gray
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink'

The color palette of the component

size md
'sm' | 'md' | 'lg'

The size of the component

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
unstyled
boolean

Whether to remove the component's style.

defaultFocusedValue
DateValue

The initial focused date when rendered. Use when you don't need to control the focused date of the date picker.

defaultOpen
boolean

The initial open state of the date picker when rendered. Use when you don't need to control the open state of the date picker.

defaultValue
DateValue[]

The initial selected date(s) when rendered. Use when you don't need to control the selected date(s) of the date picker.

disabled
boolean

Whether the calendar is disabled.

fixedWeeks
boolean

Whether the calendar should have a fixed number of weeks. This renders the calendar with 6 weeks instead of 5 or 6.

focusedValue
DateValue

The controlled focused date.

format
(date: DateValue, details: LocaleDetails) => string

The format of the date to display in the input.

id
string

The unique identifier of the machine.

ids
Partial<{ root: string; label: (index: number) => string; table: (id: string) => string; tableHeader: (id: string) => string; tableBody: (id: string) => string; tableRow: (id: string) => string; content: string; ... 10 more ...; positioner: string; }>

The ids of the elements in the date picker. Useful for composition.

immediate
boolean

Whether to synchronize the present change immediately or defer it to the next frame

inline
boolean

Whether to render the date picker inline

isDateUnavailable
(date: DateValue, locale: string) => boolean

Returns whether a date of the calendar is available.

max
DateValue

The maximum date that can be selected.

min
DateValue

The minimum date that can be selected.

name
string

The `name` attribute of the input element.

numOfMonths
number

The number of months to display.

onExitComplete
VoidFunction

Function called when the animation ends in the closed state

onFocusChange
(details: FocusChangeDetails) => void

Function called when the focused date changes.

onOpenChange
(details: OpenChangeDetails) => void

Function called when the calendar opens or closes.

onValueChange
(details: ValueChangeDetails) => void

Function called when the value changes.

onViewChange
(details: ViewChangeDetails) => void

Function called when the view changes.

open
boolean

The controlled open state of the date picker

parse
(value: string, details: LocaleDetails) => DateValue | undefined

Function to parse the date from the input back to a DateValue.

placeholder
string

The placeholder text to display in the input.

positioning
PositioningOptions

The user provided options used to position the date picker content

present
boolean

Whether the node is present (controlled by the user)

readOnly
boolean

Whether the calendar is read-only.

startOfWeek
number

The first day of the week. `0` - Sunday `1` - Monday `2` - Tuesday `3` - Wednesday `4` - Thursday `5` - Friday `6` - Saturday

translations
IntlTranslations

The localized messages to use.

value
DateValue[]

The controlled selected date(s).

view
DateView

The view of the calendar

Input

PropDefaultType
fixOnBlur true
boolean

Whether to fix the input value on blur.

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
index
number

The index of the input to focus.

View

PropDefaultType
view *
DateView

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.

TableCell

PropDefaultType
value *
number | DateValue

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
columns
number

disabled
boolean

visibleRange
VisibleRange

PresetTrigger

PropDefaultType
value *
PresetTriggerValue

as
React.ElementType

The underlying element to render.

asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.

Explorer

Explore the DatePicker component parts interactively. Click on parts in the sidebar to highlight them in the preview.

23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5

Component Anatomy

Hover to highlight, click to select parts

clearTrigger

content

control

input

label

monthSelect

nextTrigger

positioner

presetTrigger

prevTrigger

rangeText

root

table

tableBody

tableCell

tableCellTrigger

tableHead

tableHeader

tableRow

trigger

view

viewControl

viewTrigger

yearSelect

valueText

indicatorGroup

date-picker.recipe.ts

Previous

Download Trigger

Next

Calendar