- Home
- Primitives
- Calendar
Calendar
Date selection with day/month/year views.
Preview
| 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | 0 | 0 | 0 | 0 | 0 |
This preview uses documentation-only styling. Ship with one of the included recipe outputs (CSS, Tailwind, or UnoCSS) for production styles.
Date selection with day/month/year views.
Usage
Compose Root, Header, PrevButton, Title, NextButton, Grid, Cell.
import * as Calendar from "@solidiom/calendar"
;<Calendar.Root>Calendar content</Calendar.Root>Installation
Install the package with pnpm add @solidiom/calendar. The package requires compatible solid-js and @solidjs/web peer dependencies.
Parts
Calendar exposes 7 parts:
- Root —
data-part="root". - Header —
data-part="header". - PrevButton —
data-part="prevbutton". - Title —
data-part="title". - NextButton —
data-part="nextbutton". - Grid —
data-part="grid". - Cell —
data-part="cell".
Styling
Calendar carries data-scope="calendar" and data-part attributes on each part for CSS/recipe targeting. State attributes like data-state, data-disabled, and data-highlighted are exposed where applicable.
Keyboard & behavior
This primitive has no keyboard interaction. It renders content that does not independently receive focus or respond to key events.
Composition
Calendar is designed to compose with other primitives. Its parts can be combined with Field, Button, or other primitives as needed.
SSR and hydration
Calendar renders as semantic HTML during server rendering. Interactive behavior (keyboard handlers, state management) activates on hydration without layout shift.