Date Input

A visual way to choose a date using a calendar view and input box.

Examples

Basic Usage

Date Presets

Allow to select a date from a predefined set of dates, useful for applications requiring a specific date selection. User can use the presets prop to define the presets.

API

Component

PropDescriptionDefault
sizeSize of the input.
string
fullWidthIf true, the input will take up the full width of its container.
boolean
selectOnFocusIf true, the input will be focused during the first mount.
boolean
errorIf true, the input will show an error state.
boolean
containerClassnameAdditional classname for the input container element.
string
startContent to display before the input. @deprecated Use `startAdornment` instead.
ReactNode
endContent to display after the input. @deprecated Use `endAdornment` instead.
ReactNode
startAdornmentElement to display before the Button content.
ReactNode
endAdornmentElement to display after the Button content.
ReactNode
onValueChangeShortcut for the onChange value event.
(value: string) => void
themeTheme for the Input. Custom theme for the date input.
InputTheme & DateInputTheme
formatThe format in which the date should be displayed.
{string}
MM/dd/yyyy
placementCalendar placement type.
Placement
bottom-start
openOnFocusOpen calendar on field focus
boolean
true
presetPreset to show in quick filter.
PresetOption[]
[]
openCalendarOptionNameName of the option to open the calendar.
string
iconIcon to show in open calendar button.
ReactElement<any, string | JSXElementConstructor<any>>
<CalendarIcon />
isRange
boolean
value *
Date | [Date, Date]
onChange *
((value: [Date, Date]) => void) | ((value: Date) => void)