@rastech-inc/moment-timezone
v6.1.11
Published
Enhanced named time zone functionality with Moment Timezone
Maintainers
Readme
FullCalendar Moment Timezone Plugin
Enhanced named time zone functionality with Moment Timezone
Installation
First, ensure Moment Timezone is installed:
npm install moment-timezoneThen, install the FullCalendar core package, the Moment Timezone plugin, and any other plugins (like daygrid):
npm install @fullcalendar/core @fullcalendar/moment-timezone @fullcalendar/daygridUsage
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()