Skip to content

Components

MonthCalendar: a month of things you move between days

MonthCalendar shows a month as weeks of days with things on them, such as posts, deliveries or visits, and moves them between days by drag or from the keyboard. It is the kit's ScheduleGrid with weeks as rows, so it copies with Alt, refuses a day with a reason before the drop and announces every step.

By Bohuslav PoláčekChecked

Martin Kerr's content calendar for December 2026: 21 posts with their state glyph, time and title, three in the warning colour for something missing, and the first days of January on the quiet surface; a phone shows the glyphs alone.

What it is for, and what the preview shows

A plan that lives by the day rather than the hour: posts in a content plan, deliveries, visits. The preview is Martin Kerr's content calendar for December 2026 as the demo shows it on Wednesday 2 December, rebuilt from the kit with the demo's posts. Each post is its state glyph, its time and its title: nine ideas with an empty glyph, seven drafts with a dashed one, one waiting for approval, one approved, two scheduled and one already published. Three are in the warning colour because the demo flags something missing on them, and the rest stay quiet. The week numbers head the rows, and the first days of January sit on the quiet surface, with three posts already on New Year's Day.

The calendar marks today from the clock of the device that draws it, so the preview's ink pill sits on the day this page was built. A phone gets the same seven columns, about 43px a day, so the narrow preview keeps each post's state glyph alone; the demo shows a phone the month's posts as a list instead. The screen around it is the content calendar, where the display menu switches between this month, a week of posts by the hour and the queue.

The rules, and where they live

  • The manifest: use it for a content plan, deliveries or visits by day, moved by drag; not for hours of a day (TimeGrid) and not for picking a date (DatePicker). It replaces "a hand-built month grid" and "a calendar library".
  • AGENTS.md, Apps do work: planning views are editors: drag, quick add in an empty cell, copy, live feedback, the same from the keyboard.
  • AGENTS.md, Look and feel: the normal state is quiet: what is fine shows a neutral glyph or plain text, and colour goes to what needs doing.
  • AGENTS.md, Apps do work: another presentation of the same page (day, week, month) is one DisplayMenu button, never a segmented control in the header.
  • docs/principles.md, Planning views are editors: ScheduleGrid, ResourceTimeline, TimeGrid, MonthCalendar and GanttChart carry the interaction; the app says what a move means.
  • docs/principles.md, page widths: calendars run edge to edge and scroll inside themselves, never the page.

What AI coding tools write instead

A calendar library or a hand-built grid of day cells, as the manifest's replaces names them. What goes wrong:

  • The library's month view brings its own colours and fonts, and its drag and drop is an add-on nobody can use from the keyboard. The kit's month is the rota's grid with weeks as rows: Space picks a post up, the arrows choose a day, Space drops it, Alt makes a copy.
  • A busy day grows taller than the rest, or its posts spill out of the cell. Past maxPerDay the kit folds the rest into "+2 more", which opens the whole day.
  • A day that cannot take a post, such as one promised to a brand, is refused after the drop, if at all. refuseMove says why while the post is carried, and a drop there sends it back.
  • Weeks start on whatever day the library's locale picks and carry no number. The kit's weeks start on Monday, each row headed by its ISO week number.

How to use it

  • month: any day of the month to show; direction (1 or -1) slides a new month in from its side.
  • items with getId, getLabel (used in announcements), getDate (the item's day) and renderItem; itemClassName for a pending look.
  • onMove applies a move or a copy optimistically; without it nothing moves. allowCopy turns copies with Alt on or off.
  • refuseMove returns why a day cannot take the item, and onRefuse tells the person.
  • onOpen opens an item; maxPerDay folds the rest of a full day into a button that calls onOpenDay.
  • onCreate with createLabel puts a "+" in the empty part of a day.

Its entry in the manifest

The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

Where it runs in the example apps

The example apps whose code renders a MonthCalendar, and the modules it sits in.Read from the demo's source when the site was built: 1 of 9 example apps render <MonthCalendar>, in the modules named here as each app's sidebar names them.

How the demo calls it

apps/demo/src/modules/content/components/month-grid.tsx
<MonthCalendar<PostRow>
  label={caption}
  month={month}
  items={sorted}
  getId={(post) => post.id}
  getLabel={postName}
  getDate={(post) => dayOf(post.at)}
  renderItem={(post) => <PostChip post={post} />}
  allowCopy={false}
  direction={direction}
  onOpen={onOpen}
  onOpenDay={onOpenDay}
  onMove={planning ? ({ item, to }) => planning.onMove(item, stamp(to, timeOf(item.at))) : undefined}
  refuseMove={planning ? ({ item, to }) => planning.refuse(item, stamp(to, timeOf(item.at))) : undefined}
  onRefuse={planning ? (_, reason) => planning.onRefuse(reason) : undefined}
  onCreate={planning ? planning.onCreate : undefined}
  createLabel={createLabel}
Martin Kerr's month of posts: sorted by time, each drawn as its chip, copies off, and moving, refusing and creating only for people who may plan, keeping each post's time of day.

Questions

Can a post be moved to another day with the keyboard?

Yes. Tab to the post, press Space to pick it up, choose a day with the arrow keys and press Space to drop it, or Alt with Space for a copy when copies are on. Escape cancels, and every step is announced.

What happens when a day has too many posts?

Past maxPerDay the day shows as many as fit and folds the rest into a +2 more button, which opens the whole day through onOpenDay.

How does it mark today?

With an ink pill on the day's number, taken from the clock of the device that draws the calendar; there is no prop to set it. A month in the past or the future simply has no pill.

Can it show a week instead of a month?

A week of posts by the hour is TimeGrid with neutral content cards. The demo's content calendar puts both, and a queue, behind one display menu, so the page and its address stay the same.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app