Sajari UI

DateRangePicker

DateRangePicker component is a date input with a calendar popover below.

Import

Usage

Here's a basic usage of the DateRangePicker component.

Editable Example

Sizes

Editable Example

Format

Format of the string is based on Unicode Technical Standard #35.

Editable Example

Without time

Editable Example

Disable auto focus mode

Editable Example

Disabled date

Editable Example

Don't show input

Editable Example

Props

The DateRangePicker component composes PseudoBox so you can pass all PseudoBox props, and React.InputHTMLAttributes.

NameTypeDefaultDescription
startDateDaterequiredA state to control start date of the DateRangePicker.
setStartDatefunctionrequiredA function that receives the updated start date, used to update your state.
endDateDaterequiredA state to control end date of the DateRangePicker.
setEndDatefunctionrequiredA function that receives the updated end date, used to update your state.
formatDatestringThe format of the display date.
includeTimebooleantrueShow time in the calendar.
autoChangeFocusbooleantrueAuto change focus after selecting date.
disabledDatefunctionSpecify the date that cannot be selected.
placeholderstringThe placeholder for the inner input field.
size"sm", "md""md"The size of the input field and the calendar.
placementPopperJS.Placement"bottom"The placement of the calendar dropdown.