Skip to content

Migrating from react-big-calendar

If you’re coming from react-big-calendar, this guide covers the key differences and shows how to migrate your code.

react-big-calendartrud-calendar
DatesDate objectsISO 8601 strings
Localelocalizer + messages + culture (3 props)Single locale prop
StylingCSS file + Sass variablesCSS variables + Tailwind v4
Touch supportSeparate addonBuilt-in (Pointer Events API)
Dark modeManual CSS overrides.dark class, auto-inherits shadcn
Tree-shakingLimitedFull (headless core is framework-agnostic)
import { Calendar, dateFnsLocalizer } from "react-big-calendar";
import { format, parse, startOfWeek, getDay } from "date-fns";
import { es } from "date-fns/locale/es";
import "react-big-calendar/lib/css/react-big-calendar.css";
const localizer = dateFnsLocalizer({
format,
parse,
startOfWeek,
getDay,
locales: { es },
});
const messages = {
today: "Hoy",
previous: "Anterior",
next: "Siguiente",
month: "Mes",
week: "Semana",
day: "Dia",
agenda: "Agenda",
noEventsInRange: "No hay eventos",
};
function App() {
return (
<Calendar
localizer={localizer}
culture="es"
messages={messages}
events={events.map((e) => ({
...e,
start: parseISO(e.start),
end: parseISO(e.end),
}))}
onSelectEvent={(event) => console.log(event)}
view={view}
onView={setView}
date={date}
onNavigate={setDate}
components={{ toolbar: CustomToolbar }}
/>
);
}
import { Calendar } from "trud-calendar";
function App() {
return (
<Calendar
events={events}
locale={{
locale: "es-ES",
weekStartsOn: 1,
labels: {
today: "Hoy",
month: "Mes",
week: "Semana",
day: "Dia",
agenda: "Agenda",
noEvents: "No hay eventos",
},
}}
onEventClick={(event) => console.log(event)}
view={view}
onViewChange={setView}
date={date}
onDateChange={setDate}
slots={{ toolbar: CustomToolbar }}
/>
);
}

No localizer, no date conversions, no CSS file import (styles come from CSS variables).

react-big-calendartrud-calendarNotes
events (with Date objects)events (with ISO strings)No parseISO() needed
onSelectEventonEventClick
onSelectSlotonSlotClick / onSlotSelectonSlotClick for single click, onSlotSelect for drag range
view + onViewview + onViewChange
date + onNavigatedate + onDateChangedate is a "YYYY-MM-DD" string
defaultViewdefaultViewSame
defaultDatedefaultDateString instead of Date
localizer + culture + messageslocaleSingle prop: { locale, weekStartsOn, labels }
componentsslotsSame concept, renamed
components.toolbarslots.toolbar
components.eventslots.event
selectableAlways enabledClicking slots always works
draggableAccessorenableDnDBoolean — all events or none
onEventDroponEventDropSignature: (event, newStart, newEnd)
onEventResizeonEventResizeSignature: (event, newStart, newEnd)
min / maxdayStartHour / dayEndHourNumbers (0-24) instead of Date objects
step / timeslotsFixed at 15min intervals

react-big-calendar requires Date objects everywhere. trud-calendar uses ISO 8601 strings:

// react-big-calendar
const event = {
title: "Meeting",
start: new Date(2026, 2, 13, 9, 0), // Month is 0-indexed!
end: new Date(2026, 2, 13, 10, 0),
};
// trud-calendar
const event = {
id: "1", // id is required
title: "Meeting",
start: "2026-03-13T09:00:00",
end: "2026-03-13T10:00:00",
};

Key difference: trud-calendar events require an id field. If your events already have IDs from your database, use those directly.

react-big-calendar uses a separate DnD addon with the HTML5 Drag API. trud-calendar uses the Pointer Events API natively — touch support works out of the box:

// react-big-calendar
import withDragAndDrop from "react-big-calendar/lib/addons/dragAndDrop";
import "react-big-calendar/lib/addons/dragAndDrop/styles.css";
const DnDCalendar = withDragAndDrop(Calendar);
<DnDCalendar
onEventDrop={({ event, start, end }) => handleDrop(event, start, end)}
onEventResize={({ event, start, end }) => handleResize(event, start, end)}
/>
// trud-calendar
<Calendar
enableDnD
onEventDrop={(event, newStart, newEnd) => handleDrop(event, newStart, newEnd)}
onEventResize={(event, newStart, newEnd) => handleResize(event, newStart, newEnd)}
/>

No HOC wrapper, no addon import, no extra CSS file.

react-big-calendar ships a CSS file with class-based overrides. trud-calendar uses CSS variables that integrate with your design system:

/* react-big-calendar: override specific classes */
.rbc-toolbar { /* ... */ }
.rbc-event { /* ... */ }
/* trud-calendar: override CSS variables */
:root {
--trc-primary: #6366f1;
--trc-border: hsl(0 0% 92%);
--trc-today-bg: hsl(262 80% 95%);
}

If you use shadcn/ui, the calendar inherits your theme automatically. See Theming for details.