Views

Month

The Solid month, a grid of weeks with multi-day bars and a "+N more" popover, from the Solid registry.

Live. The page that Add it builds, with two events in October 2026. Drag one to move it.

The Solid demo opens on the month, with more events and a toolbar.

createMonthView shows every week that touches the month, starting on weekRules.firstDay. Most months need five rows; some need four or six. The scrolling month swipes up and down through the weeks a month at a time.

Add it

Add the month-view item to your app with the shadcn CLI, as UI source describes. It brings the theme, the shared calendar parts and the kit's popover:

npx shadcn@latest add @moltenship/month-view

Then register the view:

calendar.tsx
import {
  createCalendar,
  createCanonicalEventAdapter,
  type CalendarEvent,
  type CalendarEventChange,
} from "@moltenship/calendar-solid";
import { createSignal } from "solid-js";

import type { CalendarEventColor } from "@/components/calendar/event-colors";
import { createMonthView } from "@/components/calendar/month-view/month-view";

export type Event = CalendarEvent<{ readonly color: CalendarEventColor }>;

export const Calendar = createCalendar<Event>()({
  eventAdapter: createCanonicalEventAdapter<{ readonly color: CalendarEventColor }>(),
  views: [createMonthView<Event>({ getEventColor: (event) => event.data.color })],
});

The view is named month. Previous and Next move by one month. Its weeks share the height they're given, so give Calendar.Viewport a height, and save the changes a drag or a key proposes in onEventChange:

month-page.tsx
export default function MonthPage() {
  const [events, setEvents] = createSignal<readonly Event[]>(seed);
  // A drag or a key proposes a change; saving it moves the event.
  const save = (change: CalendarEventChange<Event, string, string>) => {
    if (change.cause === "create") {
      const event: Event = {
        data: { color: "blue" },
        id: crypto.randomUUID(),
        title: "New event",
        ...change.proposed,
      };
      setEvents((all) => [...all, event]);
    } else if (change.cause !== "delete") {
      setEvents((all) =>
        all.map((event) =>
          event.id === change.eventId ? { ...event, ...change.proposed } : event,
        ),
      );
    }
  };
  return (
    <Calendar.Root
      defaultAnchorDate={Temporal.PlainDate.from("2026-10-08")}
      defaultTimeZone="UTC"
      defaultView="month"
      events={events()}
      locale="en-US"
      onEventChange={save}
      viewOptions={{ month: { dragPreview: "free" } }}
      weekRules={{ firstDay: 7, minimalDays: 1, weekend: [6, 7] }}
    >
      {/* The weeks share the viewport's height, and show as many events as fit. */}
      <Calendar.Frame class="flex h-dvh flex-col">
        <h1 class="p-4 text-lg font-semibold">
          <Calendar.Title />
        </h1>
        <Calendar.Viewport class="min-h-0 flex-1">
          <Calendar.ActiveView />
        </Calendar.Viewport>
      </Calendar.Frame>
    </Calendar.Root>
  );
}

Options

Pass them to createMonthView, or per root in viewOptions, as the page above does with dragPreview:

Prop

Type

What it shows

  • Days: weekday names across the top. Days outside the month are muted, today's date sits in a filled circle and is aria-current="date", and the first of each month reads "Oct 1".
  • Multi-day and all-day events are bars across the days they cover. A bar that continues into the previous or next week ends with a chevron. Timed bars start with their start time.
  • Single-day timed events show a colored dot, the start time and the title.
  • "+N more": rows grow to fill the height they're given, at least 80 px each, and show as many events as fit. The rest collapse into "+N more", which opens a popover with the day's events.
  • Closed days, from the root's availability, are shaded, and a screen reader hears "closed" in the day's name, after its exception's label if it has one: "Friday, October 9, 2026, Offsite, closed, 2 events".
  • Clicking a date number opens that day in the view named day. Register the registry's day view, or a view of your own by that name, so the click has somewhere to go.
  • Editing: with onEventChange on Root, drag an event to another day (timed events keep their time), or drag across days to create an all-day event. Escape cancels a drag. Each change runs your policies and onEventChange, and a screen reader hears where the event lands.
  • Changes being saved: events with a pending change, the ones useCalendarPendingChanges returns, get aria-busy and render at 60% opacity.
  • On a phone events become small tinted blocks, every date and event is at least 24 px tall, and a long press doesn't select their text.
  • Right to left mirrors the grid, the chevrons included, when the page or Calendar.Frame has dir="rtl".
  • Reduced motion opens the popover without its scale and slide.

A drag changes only the pointer layer's ghosts: the weeks and their events don't render again until the change is saved.

Anatomy

MonthView renders the parts below. The view builds them itself from its projection, so they're not parts you compose: to change one, edit its file under components/calendar/month-view.

Rendered by MonthView
MonthView                        month-view.tsx
├── Weekday header
└── MonthWeekRow                 month-week.tsx, one per week
    └── MonthDayCell             a gridcell, one per day
        ├── UnavailableTime      the shading of a closed day
        ├── Date layer           data-date
        │   └── DateButton       aria-current="date" on today
        ├── MonthEvent           month-event.tsx, one per event that starts that day
        └── MoreEvents           "+N more" and the kit's popover, with the day's events

The .tsx files are Solid components. What they render comes from plain TypeScript beside them:

FileHolds
month.styles.tsEvery class the parts set, so a restyle is one file
month-labels.tsThe dates, start times, cell names and the "+N more" words
month-layout.tsHow many lanes fit in a week, measured from the grid, and which days are closed

A bar is a MonthEvent with bar set. startsBefore and endsAfter mark the ends that continue into another week.

Keyboard

FocusKeyEffect
A day← →Previous or next day
A day↑ ↓Same weekday a week earlier or later
A dayHome, EndFirst or last day of the week
A dayPage Up, Page DownSame day in the previous or next month
A dayEnterGo into the day's events. ↑ ↓ walk them, and Escape goes back to the day
A dayShift+EnterOpen the day in the day view
A daySpaceStart an all-day event there. Arrow keys extend it, and Enter saves it
An eventSpacePick it up. Arrow keys move it by days, Enter saves, and Escape cancels
An eventShift+SpacePick up its end to resize it by days. Shift+Space again switches to its start

The grid is one tab stop. Events behind "+N more" are reachable too: while focus is on one, its week shows every event. After a drop, focus stays on the moved event.

Markup for interactions

The view connects the pointer layer for you. If you change its markup, keep the attributes it reads: each MonthDayCell holds an element with data-date underneath its events, and each event is a <button> with data-event-id. The events sit beside that element, not inside it, so a drag over a bar still finds the day under the pointer.

On this page