← All Components
<mth-date-range-calendar>
Multi-month accessible date-range picker calendar powered by CalendarCore (mode: "range") and FormattingUtils with logical range-highlight styling, live hover/focus preview, and RTL-aware 2D grid navigation.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-date-range-calendar>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/date-range-calendar"></script>
<mth-date-range-calendar months="2"></mth-date-range-calendar>import '@methane-ui/ui/date-range-calendar';
import '@methane-ui/react';
export function Example() {
return <mth-date-range-calendar months="2"></mth-date-range-calendar>;
}<script setup lang="ts">
import '@methane-ui/ui/date-range-calendar';
</script>
<template>
<mth-date-range-calendar months="2"></mth-date-range-calendar>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/date-range-calendar';
import { MthDateRangeCalendarDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthDateRangeCalendarDirective],
template: `<mth-date-range-calendar months="2"></mth-date-range-calendar>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/date-range-calendar';
import MthDateRangeCalendar from '@methane-ui/svelte/MthDateRangeCalendar.svelte';
</script>
<MthDateRangeCalendar months="2"></MthDateRangeCalendar>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
start | start | string | "" | Selected range start date in ISO-8601 YYYY-MM-DD format. |
end | end | string | "" | Selected range end date in ISO-8601 YYYY-MM-DD format. |
min | min | string | "" | Minimum selectable date in ISO-8601 YYYY-MM-DD format. |
max | max | string | "" | Maximum selectable date in ISO-8601 YYYY-MM-DD format. |
months | months | number | 2 | Number of side-by-side months to display (1 or 2). |
locale | locale | string | "" | BCP-47 locale override for month names, weekdays, and first day of week. |
disabled | disabled | boolean | false | Disables calendar interaction. |
readonly | readonly | boolean | false | Allows grid focus navigation without modifying the range. |
isDateDisabled | — | ((iso: string) => boolean) | undefined | — | Optional predicate returning true for disabled ISO dates. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-change | { start: string; end: string } | Emitted when the range selection is updated with { start, end }. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowRight | both | Day button inside range grid is focused | Moves focus one day forward (or backward in RTL) |
| ArrowLeft | both | Day button inside range grid is focused | Moves focus one day backward (or forward in RTL) |
| ArrowDown | both | Day button inside range grid is focused | Moves focus down one week (+7 days) |
| ArrowUp | both | Day button inside range grid is focused | Moves focus up one week (-7 days) |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 4 APG keyboard transitions across LTR/RTL. | mth-date-range-calendar.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(disabled), :state(readonly). | Conformance suite |
| i18n | Routes 5 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |