Skip to Content
Documentation
Getting startedComponentsChartsTheming
Overview
Concepts

Date Input

A segmented input for typing a date, with each part editable on its own.

Recipe
mmddyyyy

Anatomy

import { DateInput } from '@chakra-ui/react'
<DateInput.Root>
  <DateInput.Label />
  <DateInput.Control>
    <DateInput.Segments />
  </DateInput.Control>
  <DateInput.HiddenInput />
</DateInput.Root>

DateInput.Segments renders a segment for each part of the date in the order of the user's locale. Use the arrow keys or type to change a segment. To pick a date from a calendar instead, use the Date Picker.

Examples

Basic

mmddyyyy

Sizes

The date input uses the same sizes as Input, so it lines up with other fields in a form.

mmddyyyy
mmddyyyy
mmddyyyy
mmddyyyy
mmddyyyy

Variants

Use the variant prop to switch between outline, subtle and flushed.

mmddyyyy
mmddyyyy
mmddyyyy