← All Components
<mth-event-calendar>
Month/week/day schedule calendar (<mth-event-calendar>) powered by CalendarCore, localized FormattingUtils headers, RTL-aware 2D RovingFocusController, and event selection/creation callbacks.
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-event-calendar>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/admin/event-calendar"></script>
<mth-event-calendar view="month">Example</mth-event-calendar>import '@methane-ui/admin/event-calendar';
import '@methane-ui/react';
export function Example() {
return <mth-event-calendar view="month">Example</mth-event-calendar>;
}<script setup lang="ts">
import '@methane-ui/admin/event-calendar';
</script>
<template>
<mth-event-calendar view="month">Example</mth-event-calendar>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/admin/event-calendar';
import { MthEventCalendarDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthEventCalendarDirective],
template: `<mth-event-calendar view="month">Example</mth-event-calendar>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/admin/event-calendar';
import MthEventCalendar from '@methane-ui/svelte/MthEventCalendar.svelte';
</script>
<MthEventCalendar view="month">Example</MthEventCalendar>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
events | — | ReadonlyArray<unknown> | — | Schedule events keyed by ISO date (YYYY-MM-DD). |
view | view | 'month' | 'week' | 'day' | "month" | Active schedule granularity (month, week, or day). |
activeDate | active-date | string | "" | Focused ISO date string (YYYY-MM-DD). |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-event-select | { event: unknown } | Emitted when an existing event pill is clicked. |
mth-event-create | { date: string; time?: string } | Emitted when a day or time slot create button is clicked. |
mth-date-change | { activeDate: string; view: unknown } | Emitted when the active date or view changes. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowRight | both | calendar grid has focus | moves to next day (or previous in RTL) |
| ArrowLeft | both | calendar grid has focus | moves to previous day (or next in RTL) |
| ArrowDown | both | calendar grid has focus | moves down one week row |
| ArrowUp | both | calendar grid has focus | moves up one week row |
| Home | both | calendar grid has focus | focuses the first visible day cell |
| End | both | calendar grid has focus | focuses the last visible day cell |
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 6 APG keyboard transitions across LTR/RTL. | mth-event-calendar.spec.test.ts |
| i18n | Routes 9 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |