intro

DateRangePicker

An organism for selecting a date range, composed of two DatePicker molecules.

The DateRangePicker organism follows the Curva & Concreto doctrine. It wraps two DatePicker molecules in a grid layout to facilitate start and end date selection while natively enforcing dynamic minimum and maximum bounds between the inputs.

Basic Usage

Selected range: 2026-05-01 to 2026-05-10

Min/Max Bounds (May 2026)

Validation (Error State)

Usage

<script>
import { DateRangePicker } from 'cobogo';
let start = $state('2026-05-01');
let end = $state('2026-05-10');
</script>
<DateRangePicker bind:start bind:end />

Props

PropTypeDefaultDescription
startstringundefinedBindable start date (YYYY-MM-DD).
endstringundefinedBindable end date (YYYY-MM-DD).
minstringundefinedGlobal minimum date.
maxstringundefinedGlobal maximum date.
disabledbooleanfalseDisables both inputs.
invalidbooleanfalseSets validation error styling.
validbooleanfalseSets validation success styling.
size'sm' | 'md' | 'lg''md'Sizing scale for the inputs.

Dynamic Bounds

The DateRangePicker intrinsically limits choices to prevent illogical date ranges. If a start date is selected, the end date’s internal min attribute is set to that start date. If an end date is selected, the start date’s max is restricted.