# Introduction

A calendar engine on the Temporal API, rendered in React and in SolidJS 2, with actions an AI agent can call.

Source: https://time.molten.sh/docs/react

Moltenship Time is a calendar for scheduling screens such as bookings, rooms, shifts and team
calendars. Its engine handles dates, time zones, recurrence, calendar state, event lookups and
saving changes, and it imports no UI framework. Your events stay in the shape your app already
uses, and Time reads them through an adapter. An AI agent can read the same calendar and act on it
through named actions, under rules your app sets.

These are the React docs. `@moltenship/calendar` renders the engine in React 19, and the week, day,
month, year, agenda and resource views are React source files you copy into your app. The select
at the top of the sidebar switches to the Solid docs.

> Live example: see it at https://time.molten.sh/docs/react

To see every view with more data, try the [live demo](https://moltenship-time-demo.vercel.app), a
Google Calendar-style app built from the same views.

## Where to start

- [Build a calendar](https://time.molten.sh/docs/react/quick-start.md): Install the package, add the views with the shadcn CLI, and render a week, day, month and agenda calendar.
- [Let an AI agent use a calendar](https://time.molten.sh/docs/react/agents.md): What an agent reads, the actions it can call, and the rules your app sets.
- [Build with a coding agent](https://time.molten.sh/docs/react/agents/coding-agents.md): These docs as Markdown, llms.txt, and a skill that ships in @moltenship/calendar.
- [Parse an ICS feed](https://time.molten.sh/docs/react/ics.md): @moltenship/ics reads iCalendar text into Temporal values, with or without the calendar.

## What it looks like

This is the render part of the [Quick start](https://time.molten.sh/docs/react/quick-start.md). `Calendar` comes from
`createCalendar`, and `meetings` is a plain array of your own records.

```tsx title="calendar.tsx"
const viewLabels = { week: "Week", day: "Day", month: "Month", agenda: "Agenda" };
const viewSwitcherOptions = Calendar.views.map(({ name }) => ({
  value: name,
  label: viewLabels[name],
}));

function CalendarViewSwitcher() {
  const view = Calendar.useCalendarSelector((state) => state.view);
  const { setView } = Calendar.useCalendarActions();
  return <ViewSwitcher value={view} onValueChange={setView} options={viewSwitcherOptions} />;
}

export const weekRules = { firstDay: 1, minimalDays: 4, weekend: [6, 7] } as const;

export function TeamCalendar({ meetings }: { readonly meetings: readonly Meeting[] }) {
  return (
    <Calendar.Root
      events={meetings}
      defaultAnchorDate={Temporal.PlainDate.from("2026-10-08")}
      defaultTimeZone="Europe/Berlin"
      locale="en-US"
      weekRules={weekRules}
    >
      <Calendar.Frame className="flex h-[640px] flex-col rounded-xl border">
        <CalendarToolbar calendar={Calendar}>
          <CalendarViewSwitcher />
        </CalendarToolbar>
        <Calendar.Viewport className="min-h-0 flex-1">
          <Calendar.ActiveView />
        </Calendar.Viewport>
      </Calendar.Frame>
    </Calendar.Root>
  );
}
```

## Who it's for

Time is for developers who build scheduling screens and want to:

- keep their existing event data and API,
- style the calendar with their own design system, or start from shadcn/ui,
- get time zones and daylight saving time right without writing that math themselves,
- let an AI agent work with the calendar without handing it the page's markup.

[Comparison](https://time.molten.sh/docs/react/comparison.md) sets Time beside FullCalendar and react-big-calendar, including
where they're ahead.

## What you get

The engine, the calendar's state, the keyboard, the gestures and the hooks are the same in React
and Solid. Solid's registry has every view, in Tailwind CSS, and `calendar-full` installs them
all. The StyleX views, the testing package and the dnd-kit adapter exist in React only.
[React and Solid](https://time.molten.sh/docs/react/frameworks.md) has the full table.

- **Your data, read through an adapter.** You describe how to read an ID, a title and a time range
  from your records. TypeScript keeps your record and ID types in every hook and callback.
- **Three kinds of time.** Timed events use `Temporal.Instant`, all-day events use
  `Temporal.PlainDate`, and floating events use `Temporal.PlainDateTime`. No `Date` objects.
- **Time zones and daylight saving time.** The engine lays out days that are 23 or 25 hours long,
  and hours that a clock change skips or repeats. See
  [Time and time zones](https://time.molten.sh/docs/react/concepts/time.md).
- **Recurrence and iCalendar.** [`@moltenship/calendar-recurrence`](https://time.molten.sh/docs/react/recurrence.md) expands
  RRULE series inside the dates on screen, and [`@moltenship/ics`](https://time.molten.sh/docs/react/ics.md) parses ICS feeds.
  Neither imports a framework.
- **Changes you save.** A move, a resize, a create or a delete arrives as a change in
  `onEventChange`. It shows as pending while it saves, rolls back if saving fails, and passes
  through policies you choose. See [Interactions](https://time.molten.sh/docs/react/interactions.md).
- **Controlled or uncontrolled state.** The calendar or your app can own the visible date, the
  view, the time zone, the selection and the focus, one value at a time.
- **Headless parts.** `Root`, the previous, next and today buttons, `Title` and `ActiveView` render
  plain elements. A view is a strategy and a component.
  [Custom views](https://time.molten.sh/docs/react/views/custom-views.md) shows how to write one. The registry's views are one UI
  built on these parts, and [Customization](https://time.molten.sh/docs/react/customization.md) shows how to restyle it, edit it
  or build your own.
  
- **Actions for agents.** A calendar gives an AI agent fourteen actions, and a fifteenth, deleting,
  when you allow it. They describe the calendar, list its events, navigate, switch view, and
  create, rename, move and resize events. An agent sees nothing until your app creates ui-sdk's
  agent bridge. An agent's change goes through your policies and your `onEventChange`, marked as an
  agent's, and the agent gets back how it ended. A browser's built-in agent reaches them through
  WebMCP, an experimental browser API, and a model you run reaches them through `agentTools`.
  See [Agents in your app](https://time.molten.sh/docs/react/agents.md).
- **Editing by pointer and keyboard.** `useCalendarPointer` turns drags into moves, resizes and
  creates, with a mouse, a pen or touch, and `useCalendarKeyboard` moves focus through a view and
  moves and resizes events from the keyboard. The `Announcer` says each step to a screen reader.
  See [Changing events](https://time.molten.sh/docs/react/accessibility.md#changing-events).
- **Undo and redo.** `createEventHistory` records changes, and `useCalendarHistory` and its
  keyboard shortcuts take them back. See [Undo and redo](https://time.molten.sh/docs/react/undo-redo.md).
- **Server rendering.** During server rendering, Time doesn't read the clock, the host time zone or
  `window`, so the server and the browser render the same markup from the same props.
- **Docs your coding agent can read.** Every page has a Markdown version, at its own address with
  `.md` added, and [`/llms.txt`](https://time.molten.sh/llms.txt) lists them.
  The docs ship inside `@moltenship/calendar`, and a skill teaches a coding agent the library.
   See [Build with a coding
  agent](https://time.molten.sh/docs/react/agents/coding-agents.md).

### Only in React today

- **Built-in views.** [Week, day](https://time.molten.sh/docs/react/views/week-and-day.md), [month](https://time.molten.sh/docs/react/views/month.md),
  [year](https://time.molten.sh/docs/react/views/year.md), [agenda](https://time.molten.sh/docs/react/views/agenda.md),
  [resource columns](https://time.molten.sh/docs/react/views/resource-columns.md) and
  [resource timeline](https://time.molten.sh/docs/react/views/resource-timeline.md), plus week, day, month and agenda views that
  [scroll without end](https://time.molten.sh/docs/react/views/scrolling.md). They are source files built on shadcn/ui and
  Tailwind CSS, or on [StyleX](https://time.molten.sh/docs/react/stylex.md), with a [theme](https://time.molten.sh/docs/react/theming.md) of calendar tokens and
  an event color palette.
- **Editing in the built-in views.** The views bind the pointer and the keyboard, and the
  registry's undo toast offers to take each change back.
- **A testing package.** [`@moltenship/calendar-testing`](https://time.molten.sh/docs/react/testing.md) has a fixed clock, typed
  builders, a render harness, and keyboard and pointer drivers.

- [Installation](https://time.molten.sh/docs/react/installation.md): Requirements and setup.
- [Quick start](https://time.molten.sh/docs/react/quick-start.md): A week, day, month and agenda calendar.
- [React and Solid](https://time.molten.sh/docs/react/frameworks.md): What the two integrations share, and what each has today.
- [Concepts](https://time.molten.sh/docs/react/concepts/how-it-works.md): The packages, events, time and state.
