npm.io
7.0.1 • Published yesterday

@fullcalendar/google-calendar

Licence
MIT
Version
7.0.1
Deps
2
Size
17 kB
Vulns
0
Weekly
0
Stars
20.6K

FullCalendar Google Calendar Plugin

Display events from a public Google Calendar feed

Installation

Install the FullCalendar vanilla-JS package, the Google Calendar plugin, and any other plugins (like daygrid):

npm install fullcalendar @fullcalendar/google-calendar temporal-polyfill

Usage

Instantiate a Calendar with the necessary plugin:

import { Calendar } from 'fullcalendar'
import classicThemePlugin from 'fullcalendar/themes/classic'
import dayGridPlugin from 'fullcalendar/daygrid'
import googleCalendarPlugin from '@fullcalendar/google-calendar'

import 'fullcalendar/skeleton.css'
import 'fullcalendar/themes/classic/theme.css'
import 'fullcalendar/themes/classic/palette.css'

const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
  plugins: [
    googleCalendarPlugin,
    dayGridPlugin,
    classicThemePlugin
  ],
  initialView: 'dayGridMonth',
  events: {
    googleCalendarId: 'abcd1234@group.calendar.google.com'
  }
})

calendar.render()

Keywords