TidalUI

Date range picker preview

Choose start and end dates with linked calendars.

pro · Forms · primitive

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/date-range-picker

Import components/ui/tidal.css, components/ui/date-range-picker.css. Wrap installed components in tidal-scope.

Preview

Date range picker component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/date-range-picker.css";
import{TidalDateRangePicker}from"./components/ui/date-range-picker";
export default()=><div className="tidal-scope"><TidalDateRangePicker label={"Demo"} onValueChange={() => {}} value={{start:"value",end:"value"}}/></div>;

API and props

TidalDateRangePicker.label (required)
string

Required label value accepted by this exported component.

TidalDateRangePicker.onValueChange (required)
(range: TidalDateRange) => void

Callback invoked when the value change interaction is proposed.

TidalDateRangePicker.value (required)
TidalDateRange

Required value value accepted by this exported component.

TidalDateRangePicker.clearable
boolean | undefined

Optional clearable value accepted by this exported component.

TidalDateRangePicker.description
string | undefined

Optional description value accepted by this exported component.

TidalDateRangePicker.dir
"ltr" | "rtl" | undefined

Optional dir value accepted by this exported component.

TidalDateRangePicker.endInputProps
DateInputProps | undefined

Optional end input props value accepted by this exported component.

TidalDateRangePicker.endLabel
string | undefined

Optional end label value accepted by this exported component.

TidalDateRangePicker.endRef
Ref<HTMLInputElement> | undefined

Optional end ref value accepted by this exported component.

TidalDateRangePicker.error
string | undefined

Optional error value accepted by this exported component.

TidalDateRangePicker.isDateDisabled
((iso: string) => boolean) | undefined

Endpoint availability. Interior dates are the consumer's isRangeDisabled responsibility.

TidalDateRangePicker.isRangeDisabled
((range: TidalCompleteDateRange) => boolean) | undefined

Optional is range disabled value accepted by this exported component.

TidalDateRangePicker.labels
Partial<{ open: string; calendar: string; calendarTitle: string; shortcuts: string; clear: string; previous: string; next: string; month: string; year: string; apply: string; cancel: string; unavailable: string; instructions: string; chooseEnd: string; chooseStart: string; days: (count: number) => string; yearRange: (min: number, max: number) => string; }> | undefined

Optional labels value accepted by this exported component.

TidalDateRangePicker.locale
string | undefined

Optional locale value accepted by this exported component.

TidalDateRangePicker.max
string | undefined

Optional max value accepted by this exported component.

TidalDateRangePicker.maxDays
number | undefined

Optional max days value accepted by this exported component.

TidalDateRangePicker.messages
Partial<Record<TidalRangeIssue, string>> | undefined

Optional messages value accepted by this exported component.

TidalDateRangePicker.min
string | undefined

Optional min value accepted by this exported component.

TidalDateRangePicker.minDays
number | undefined

Optional min days value accepted by this exported component.

TidalDateRangePicker.months
1 | "auto" | 2 | undefined

Optional months value accepted by this exported component.

TidalDateRangePicker.presets
Array<{ label: string; value: TidalCompleteDateRange; }> | undefined

Optional presets value accepted by this exported component.

TidalDateRangePicker.readOnly
boolean | undefined

Optional read only value accepted by this exported component.

TidalDateRangePicker.required
boolean | undefined

Optional required value accepted by this exported component.

TidalDateRangePicker.startInputProps
DateInputProps | undefined

Optional start input props value accepted by this exported component.

TidalDateRangePicker.startLabel
string | undefined

Optional start label value accepted by this exported component.

TidalDateRangePicker.startRef
Ref<HTMLInputElement> | undefined

Optional start ref value accepted by this exported component.

TidalDateRangePicker.theme
"light" | "dark" | undefined

Optional theme value accepted by this exported component.

TidalDateRangePicker.today
string | undefined

Optional today value accepted by this exported component.

TidalDateRangePicker.weekStartsOn
0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined

Optional week starts on value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas