JSPM

  • Created
  • Published
  • Downloads 904473
  • Score
    100M100P100Q199055F
  • License MIT

Display events on time slots

Package Exports

  • @fullcalendar/timegrid
  • @fullcalendar/timegrid/internal
  • @fullcalendar/timegrid/package.json

Readme

FullCalendar Time Grid Plugin

Display events on time slots

Installation

Install the necessary packages:

npm install @fullcalendar/core @fullcalendar/timegrid

Usage

Instantiate a Calendar with the necessary plugin:

import { Calendar } from '@fullcalendar/core'
import timeGridPlugin from '@fullcalendar/timegrid'
import classicThemePlugin from '@fullcalendar/theme-classic'

import '@fullcalendar/core/skeleton.css'
import '@fullcalendar/theme-classic/theme.css'
import '@fullcalendar/theme-classic/palette.css'

const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
  plugins: [timeGridPlugin, classicThemePlugin],
  initialView: 'timeGridWeek',
  events: [
    { title: 'Meeting', start: new Date() }
  ]
})

calendar.render()