@react-agendfy/fullcalendar-compat
v1.3.0
Published
Drop-in replacement for @fullcalendar/react on top of react-agendfy: same props, callbacks (info objects, EventApi, revert) and getApi().
Downloads
858
Maintainers
Readme
@react-agendfy/fullcalendar-compat
Move from @fullcalendar/react to react-agendfy by changing
one import. The package keeps the same props, the same callback info
objects (an EventApi with startStr, extendedProps, _def and
info.revert()) and the same ref.current.getApi().
npm i @react-agendfy/core @react-agendfy/fullcalendar-compat- import FullCalendar from "@fullcalendar/react";
- import dayGridPlugin from "@fullcalendar/daygrid";
- import timeGridPlugin from "@fullcalendar/timegrid";
- import interactionPlugin from "@fullcalendar/interaction";
+ import FullCalendar from "@react-agendfy/fullcalendar-compat";
+ import "@react-agendfy/core/core.css";
<FullCalendar
- plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}
initialView="timeGridWeek"
headerToolbar={{ left: "prev,next today", center: "title", right: "dayGridMonth,timeGridWeek,listWeek" }}
editable
selectable
events={events}
eventClick={(info) => openModal(info.event.id, info.event.extendedProps)}
eventDrop={(info) => api.move(info.event.id, info.event.startStr).catch(info.revert)}
/>You can keep the plugins prop if you like. It is accepted and ignored,
because recurrence, interaction and lists are built into the core.
What you get on top of FullCalendar
- Recurrence, list views and interaction are built in. No
@fullcalendar/rruleand no extra plugins.exdateworks, and occurrences keep the seriesid. - Per-day overlap layout, with a drag preview that snaps to slots and stays aligned while the grid scrolls.
- Time zones come from
@date-fns/tz, so you don't need a time-zone plugin.timeZone="Europe/Lisbon"works out of the box. - SSR-safe rendering (
renderToString) and an@react-agendfy/aiadd-on. - Native agendfy plugins (custom views, export, themes) are available
through the
agendfyPluginsprop.
See MIGRATING.md for the full compatibility table.
