DateRangePicker
Date range selection with calendar popup
April 2026
Accessibility
- Pair the control with a visible label or aria-label and keep helper or error text programmatically associated.
- Provide native name, autocomplete, and value wiring when the component participates in form submission.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
svelte
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { DateRangePicker } from '@dryui/ui';
</script>
<DateRangePicker.Root>
<DateRangePicker.Trigger>...</DateRangePicker.Trigger>
<DateRangePicker.Content>...</DateRangePicker.Content>
<DateRangePicker.Calendar>...</DateRangePicker.Calendar>
<DateRangePicker.Preset>...</DateRangePicker.Preset>
</DateRangePicker.Root> Import options
Root package
ts
import { DateRangePicker } from '@dryui/ui' Per-component subpath
ts
import { DateRangePicker } from '@dryui/ui/date-range-picker' API
Props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Description | Default | Required | Bindable |
|---|---|---|---|---|---|
DateRangePicker.Root | |||||
| open | boolean | Whether the overlay or disclosure is currently open. | false | — | ✓ |
| startDate | Date | null | — | $bindable<Date | null>(null) | — | ✓ |
| endDate | Date | null | — | $bindable<Date | null>(null) | — | ✓ |
| locale | string | — | 'en-US' | — | — |
| min | Date | null | Minimum allowed value. | null | — | — |
| max | Date | null | Maximum allowed value. | null | — | — |
| disabled | boolean | Prevents interaction and applies disabled styling. | false | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
DateRangePicker.Trigger | |||||
| placeholder | string | Hint text shown when no value is selected or entered. | — | — | — |
| children | Snippet | Content rendered inside the component. | — | — | — |
DateRangePicker.Content | |||||
| placement | toptop-starttop-endbottombottom-startbottom-end | — | 'bottom-start' | — | — |
| offset | number | — | 8 | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
DateRangePicker.Calendar | |||||
| events | readonly CalendarEventItem[] | — | — | — | — |
| eventDisplay | CalendarEventDisplay | — | — | — | — |
| maxEventLanes | number | — | — | — | — |
| visibleMonths | CalendarVisibleMonths | — | — | — | — |
| eventContent | Snippet<[CalendarEventRenderContext]> | — | — | — | — |
DateRangePicker.Preset | |||||
| startDate | Date | — | — | ✓ | — |
| endDate | Date | — | — | ✓ | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |