@forcecalendar/react
v0.2.1
Published
React adapter for forceCalendar - enterprise calendar Web Components
Readme
@forcecalendar/react
Thin React adapter for forceCalendar — enterprise calendar Web Components that run under Salesforce Locker Service and strict CSP.
Maps props to the <forcecal-main> element's attributes and its DOM events to React callbacks. SSR-safe (custom elements register client-side only), so it works in Next.js out of the box.
Install
npm install @forcecalendar/react @forcecalendar/core @forcecalendar/interfaceUse
import { ForceCalendar } from '@forcecalendar/react';
export default function Scheduling() {
return (
<ForceCalendar
view="month"
timezone="America/New_York"
height="600px"
onDateSelect={({ date }) => console.log('selected', date)}
onEventAdded={detail => console.log('added', detail)}
/>
);
}Props: view, date, locale, timezone, weekStartsOn, height, className, style, plus callbacks onEventAdded, onEventUpdated, onEventDeleted, onDateSelect, onViewChange, onNavigate.
Docs: docs.forcecalendar.org · License: MIT
