Skip to content
nexubDesign System
v2.4.0

Components · Form & Input

Date Range Picker

StableSince v0.0.1

Dual-calendar date range selector.

import { DateRangePicker } from '@nexub/react';

Examples

Default

Controlled

Props

Props
PropTypeDefaultDescription
value{ from: Date | undefined; to: Date | undefined }—Controlled date range value.
onChange(range: { from: Date | undefined; to: Date | undefined }) => void—Callback invoked when the selected range changes.
localeLocale (date-fns)—Month and weekday names, week start and the trigger format. Defaults to the NexubProvider dateLocale; the calendar also follows the provider dir, so arrows flip in RTL.
placeholderstring'Select date range'Placeholder text shown in the trigger input when no range is selected.
disabledbooleanfalseDisables the trigger input and calendar popover.
minDateDate—Earliest selectable date. Dates before this are greyed out.
maxDateDate—Latest selectable date. Dates after this are greyed out.
numberOfMonthsnumber2Number of months to display in the calendar popover.
aria-labelstring—Field name for screen readers; the selected value is appended.
idstring—Id for the trigger button, e.g. to pair with a <label htmlFor>.
errorstring—Error message displayed below the input.

On iOS & Android