Skip to content

Date Input

Segmented input for dates and times.

mmddyyyy

Installation

Usage

Controlled

Use value and onValueChange to control the date input programmatically.

mmddyyyy
[]

States

Disabled

Use the disabled prop to prevent user interaction.

mmddyyyy

Invalid

Use the invalid prop to indicate an error state.

mmddyyyy

Sizes

Use the size prop to change the input height.

Small

mmddyyyy

Medium

mmddyyyy

Large

mmddyyyy

Examples

With Field

Use Field components for a labeled date input with helper text.

mmddyyyy

Use your local date format.

Granularity

Use the granularity prop to control which date fields are displayed.

mmddyyyy––––AM

Time Only

––––AM

Range

Set selectionMode="range".

mmddyyyy
mmddyyyy

Min and Max

Use min and max to restrict the selectable date range.

mmddyyyy

Leading Zeros

mmddyyyy

With Clear Button

Use the showClear prop to display a clear button when the date input has a value.

04042024

Custom Separator

mmddyyyy
mmddyyyy

API Reference

DateInput

Root component for the date input.


For additional props and behavior, see the Ark UI documentation.