Core Engine

@forcecalendar/core

Zero-dependency calendar logic for enterprise applications.

View on GitHub →
0
Dependencies
MIT
License
ESM
Module
~14KB
Bundle

Calendar Engine

Complete control over calendar state, navigation, and rendering logic without DOM dependencies.

  • Month, week, day, and list views
  • Navigation API with goToDate, next, previous
  • Event-driven state with subscribe/unsubscribe
Live Outputrunning
Loading...
calendar.tsTypeScript
import { Calendar } from '@forcecalendar/core';

const calendar = new Calendar({
  locale: 'en-US',
  timezone: 'America/New_York',
  weekStartsOn: 0
});

calendar.setView('month');
calendar.goToDate(new Date('2024-03-15'));

calendar.on('viewChange', (view) => {
  console.log('View:', view);
});

API surface

Every export from @forcecalendar/core.

Calendar

Core calendar engine with state, navigation, and event management

EventStore

Spatial-indexed event storage with range queries

TimezoneManager

IANA timezone conversion and DST handling

ICSParser

iCalendar import and export

SearchEngine

Full-text search across event data

StateManager

Reactive state management with subscribe/unsubscribe

Full API documentation at docs.forcecalendar.org/core/api

1

Install

npm install @forcecalendar/core
2

Initialize

import { Calendar } from '@forcecalendar/core';

const calendar = new Calendar({
  locale: 'en-US',
  timezone: 'America/New_York'
});
3

Add events

calendar.addEvent({
  title: 'Team Meeting',
  start: new Date('2024-03-15T10:00:00'),
  end: new Date('2024-03-15T11:00:00')
});