Skip to main content
Version: Next

DateRangePicker API

import { DateRangePicker } from '@editora/ui-react';

Props​

PropTypeDescription
allowPartialboolean
allowSameDayboolean
bareboolean
clearableboolean
closeOnSelectboolean
defaultOpenboolean
defaultValuestring
descriptionstringHelper text under the label: the same as hint, named like the other fields' prop.
disabledboolean
errorstring
hintstring
labelstring
localestring
maxstring
minstring
mode'popover' | 'inline'
namestring
nameEndstring
nameStartstring
onChange(detail: DateRangePickerDetail) => void
onClose() => void
onInput(detail: DateRangePickerDetail) => void
onInvalid(detail: { raw: string; reason: string }) => void
onOpen() => void
onValueChange(value: string | null) => void
openboolean
rangeVariant'two-fields' | 'single-field'
readOnlyboolean
requiredboolean
shape'default' | 'square' | 'soft'
showFooterboolean
size'sm' | 'md' | 'lg'
stateDateRangePickerState
translationsRecord<string, string> | string
valuestring
variant'default' | 'contrast'
weekStart0 | 1 | 6

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-date-range-picker>​

DateRangePicker renders the ui-date-range-picker custom element from @editora/ui-core, which can also be used without React.

Attributes: allow-partial, allow-same-day, aria-describedby, aria-description, aria-label, bare, clearable, close-on-select, default-open, default-value, disabled, error, hint, label, locale, max, min, mode, name, name-end, name-start, open, range-variant, readonly, required, shape, show-footer, size, state, translations, value, variant, week-start

Events: change, input, invalid