API reference: @salmonui/calendars/date-range-picker
DateRangePickercomponent
import { DateRangePicker } from '@salmonui/calendars/date-range-picker';function DateRangePicker(props: DateRangePickerProps): import("react").JSX.Element;
Props: DateRangePickerProps
| Name | Signature | Description |
|---|---|---|
disabledoptionalinherited | disabled?: boolean; | |
readOnlyoptionalinherited | readOnly?: boolean; | |
valueoptional | readonly value?: DateRange<DateInput> | null | undefined; | |
defaultValueoptional | readonly defaultValue?: DateRange<DateInput> | null | undefined; | |
onValueChangeoptional | readonly onValueChange?: ((value: DateRange | null, details: DateRangePickerValueChangeDetails) => void) | undefined; | |
onRangeSelectoptional | readonly onRangeSelect?: ((range: DateRange) => void) | undefined; | Both ends chosen in the popup, before Apply. |
granularityoptional | readonly granularity?: 'day' | 'month' | 'year' | undefined; | |
minoptional | readonly min?: DateInput | null | undefined; | |
maxoptional | readonly max?: DateInput | null | undefined; | |
minDaysoptional | readonly minDays?: number | undefined; | Shortest and longest allowed span in days, inclusive. |
maxDaysoptional | readonly maxDays?: number | undefined; | |
rangeOverDisabledoptional | readonly rangeOverDisabled?: 'block' | 'allow' | undefined; | Whether a range may span |
presetsoptional | readonly presets?: readonly DateRangePreset[] | undefined; | |
separatoroptional | readonly separator?: ReactNode | undefined; | Between the two fields; also splits pasted text. Default an en dash. |
confirmoptional | readonly confirm?: boolean | undefined; | Apply / Cancel in the popup (default |
visibleMonthsoptional | readonly visibleMonths?: number | undefined; | Months shown side by side (default 2; one under a narrow container). |
startNameoptional | readonly startName?: string | undefined; | Form names of the two ends; |
endNameoptional | readonly endName?: string | undefined; | |
formatoptional | readonly format?: Intl.DateTimeFormatOptions | string | undefined; | |
localeTextoptional | readonly localeText?: Partial<DateRangePickerLocaleText> | undefined; | |
refoptional | readonly ref?: Ref<PickerHandle> | undefined; | |
firstDayOfWeekoptionalinherited | firstDayOfWeek?: number; | |
showWeekNumbersoptionalinherited | showWeekNumbers?: boolean; | |
weekRuleoptionalinherited | weekRule?: WeekRule; | |
weekdayFormatoptionalinherited | weekdayFormat?: WeekdayFormat; | |
calendaroptionalinherited | calendar?: string; |
|
showTodayButtonoptionalinherited | showTodayButton?: boolean; | |
showOutsideDaysoptionalinherited | showOutsideDays?: boolean; | |
isDateDisabledoptionalinherited | isDateDisabled?: ((date: PlainDate) => boolean); | |
renderDayoptionalinherited | renderDay?: ((ctx: CalendarDayContext) => ReactNode); | |
getDayPropsoptionalinherited | getDayProps?: ((ctx: CalendarDayContext) => CalendarDayProps | undefined); | |
viewoptionalinherited | view?: CalendarView; | |
defaultViewoptionalinherited | defaultView?: CalendarView; | |
onViewChangeoptionalinherited | onViewChange?: ((view: CalendarView) => void); | |
onFocusedValueChangeoptionalinherited | onFocusedValueChange?: ((date: PlainDate) => void); | |
openoptionalinherited | open?: boolean; | |
defaultOpenoptionalinherited | defaultOpen?: boolean; | |
onOpenChangeoptionalinherited | onOpenChange?: ((open: boolean, details: PickerOpenChangeDetails) => void); | |
popupModeoptionalinherited | popupMode?: PopupMode; | |
openOnFocusoptionalinherited | openOnFocus?: boolean; | Opens the popup when focus enters the field. |
editableoptionalinherited | editable?: boolean; |
|
clearableoptionalinherited | clearable?: boolean; | Renders a clear button. |
onClearoptionalinherited | onClear?: (() => void); | |
strictoptionalinherited | strict?: boolean; | Out-of-range values move to the nearest bound and disabled or unparsable input reverts on blur. |
requiredoptionalinherited | required?: boolean; | |
invalidoptionalinherited | invalid?: boolean; | |
labeloptionalinherited | label?: ReactNode; | |
descriptionoptionalinherited | description?: ReactNode; | |
errorMessageoptionalinherited | errorMessage?: ReactNode; | |
placeholderoptionalinherited | placeholder?: string; | Watermark shown while empty and not focused. |
nameoptionalinherited | name?: string; | |
formoptionalinherited | form?: string; | |
autoFocusoptionalinherited | autoFocus?: boolean; | |
onFocusoptionalinherited | onFocus?: ((event: FocusEvent<Element, Element>) => void); | Focus entered the field group (once). |
onBluroptionalinherited | onBlur?: ((event: FocusEvent<Element, Element>) => void); | Focus left the field group and its popup (once). |
onInvalidoptionalinherited | onInvalid?: (() => void); | The form value input failed constraint validation. |
localeoptionalinherited | locale?: string; | BCP 47 locale; default |
timeZoneoptionalinherited | timeZone?: string; | IANA time zone for instant values ( |
hourCycleoptionalinherited | hourCycle?: "h12" | "h23"; | |
sizeoptionalinherited | size?: "lg" | "md" | "sm"; | Control size: |
idoptionalinherited | id?: string; | |
classNameoptionalinherited | className?: string; | |
styleoptionalinherited | style?: CSSProperties; | |
aria-labeloptionalinherited | aria-label?: string; | |
aria-labelledbyoptionalinherited | aria-labelledby?: string; | |
aria-describedbyoptionalinherited | aria-describedby?: string; |