DOCS
v0.4

Components / Calendar

Calendar

Full month calendar view with single/range selection modes, keyboard navigation, and min/max date bounds.

formsv0.7.0

Playground

Examples

Single date
<cg-calendar value="2026-04-15"></cg-calendar>
Date range
<cg-calendar mode="range" value="2026-04-10" range-end="2026-04-20"></cg-calendar>

Import

import { CgCalendar } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/cg-calendar';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
valuestring""Selected date (ISO format)
range-endstring""Range end date (range mode)
mode"single" | "range" | "multiple""single"Selection mode
minstring""Minimum date (ISO)
maxstring""Maximum date (ISO)
week-starts-on0 | 10First day of week (0=Sun, 1=Mon)

Events

EventDetailDescription
cg-calendar-change{value: string, rangeEnd?: string}Selection changed