Temporal end to end
Events are Temporal instants and plain dates, never Date. Time zones, DST gaps and repeated hours resolve exactly.
React 19 · Temporal API · shadcn/ui
Week, month, day and agenda views with exact time zone and DST handling. Bring your own data and restyle every pixel.
pnpm add @moltenship/calendarEvents are Temporal instants and plain dates, never Date. Time zones, DST gaps and repeated hours resolve exactly.
State and navigation live in typed hooks and components. Views ship as shadcn/ui source you copy in and edit.
Map your existing records with one adapter. Your ID and resource types reach every callback without casts.
No browser globals at import time. Pass the time zone and clock, and server HTML hydrates without mismatches.
"use client";
import { createCalendar, defineEventAdapter } from "@moltenship/calendar";
interface Meeting {
id: string;
title: string;
roomIds: string[];
start: Temporal.Instant;
end: Temporal.Instant;
}
export const Calendar = createCalendar<Meeting, { id: string }>()({
eventAdapter: defineEventAdapter<Meeting>()({
getId: (meeting) => meeting.id,
getTitle: (meeting) => meeting.title,
getResourceIds: (meeting) => meeting.roomIds,
getInterval: ({ start, end }) => ({ kind: "timed", start, end }),
}),
});