The calendar engine that powers enterprise applications. Zero DOM dependencies, full timezone support, and complete Salesforce compatibility.
Complete calendar logic with month, week, day, and list views. Navigation, date selection, and view state management.
Full CRUD operations for events with normalization, validation, and efficient querying with spatial indexing.
IANA timezone database integration with automatic DST handling and conversion between any timezones.
RFC 5545 compliant RRule support for complex recurring patterns with exception dates and modifications.
Full iCalendar format support for importing and exporting events with all standard properties.
LRU caching, spatial indexing, and adaptive memory management for handling thousands of events.
npm install @forcecalendar/coreimport { Calendar } from '@forcecalendar/core';
import { TimezoneManager } from '@forcecalendar/core/timezone';
import { RecurrenceEngine } from '@forcecalendar/core/events';
// Initialize calendar
const calendar = new Calendar({
locale: 'en-US',
timezone: 'America/New_York',
weekStartsOn: 0,
businessHours: {
start: '09:00',
end: '17:00'
}
});
// Add a recurring event
calendar.addEvent({
id: 'weekly-standup',
title: 'Team Standup',
start: '2024-01-15T09:00:00',
duration: 30,
recurring: 'FREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20240630',
category: 'meeting',
attendees: ['team@company.com']
});
// Query events for a specific week
const weekEvents = calendar.getEventsForWeek(new Date('2024-01-15'));
// Export to ICS
const icsData = calendar.exportToICS();