DateInput

The DateInput component lets users select a date with the keyboard.

Supported from version 5.48.0

Import

import { DateInput } from 'rsuite';

// or
import DateInput from 'rsuite/DateInput';

Examples

Basic

Customize the date format

Disabled and read only

Controlled vs. uncontrolled value

Props

<DateInput>

Property Type(default) Description
defaultValue Date Default value
disabled boolean Whether disabled the component
format string ('yyyy-MM-dd') Format of the date when rendered in the input
onChange (date: Date, event) => void Callback fired when value changed
plaintext boolean Whether plaintext the component
readOnly boolean Whether read only the component
size 'lg'〡'md'〡'sm'〡'xs' ('md') Date input can have different sizes
value Date The selected value. Used when the component is controlled
Vercel banner