FullCalendar Moment Timezone Plugin
Enhanced named time zone functionality with Moment Timezone
Installation
First, ensure Moment Timezone is installed:
npm install moment-timezone
Then, install the FullCalendar core package, the Moment Timezone plugin, and any other plugins (like daygrid):
npm install @fullcalendar/core @fullcalendar/moment-timezone @fullcalendar/daygrid
Usage
Instantiate a Calendar with the necessary plugin:
import { Calendar } from '@fullcalendar/core'
import momentTimezonePlugin from '@fullcalendar/moment-timezone'
import dayGridPlugin from '@fullcalendar/daygrid'
const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
plugins: [
momentTimezonePlugin,
dayGridPlugin
],
initialView: 'dayGridMonth',
timeZone: 'America/New_York'
})
calendar.render()