Skip to content

Latest commit

 

History

History
 
 

moment-timezone

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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' // enhance named time zones
})

calendar.render()