UNPKG

590 BMarkdownView Raw
1
2# FullCalendar Time Grid Plugin
3
4Display events on time slots
5
6## Installation
7
8Install the necessary packages:
9
10```sh
11npm install @fullcalendar/core @fullcalendar/timegrid
12```
13
14## Usage
15
16Instantiate a Calendar with the necessary plugin:
17
18```js
19import { Calendar } from '@fullcalendar/core'
20import timeGridPlugin from '@fullcalendar/timegrid'
21
22const calendarEl = document.getElementById('calendar')
23const calendar = new Calendar(calendarEl, {
24 plugins: [timeGridPlugin],
25 initialView: 'timeGridWeek',
26 events: [
27 { title: 'Meeting', start: new Date() }
28 ]
29})
30
31calendar.render()
32```