pages/fullcalendar-main/packages/interaction
2024-03-06 14:33:17 +01:00
..
src Publii: update content 2024-03-06 14:33:17 +01:00
.eslintrc.cjs Publii: update content 2024-03-06 14:33:17 +01:00
package.json Publii: update content 2024-03-06 14:33:17 +01:00
README.md Publii: update content 2024-03-06 14:33:17 +01:00

FullCalendar Interaction Plugin

Calendar functionality for event drag-n-drop, event resizing, date clicking, and date selecting

Installation

Install the FullCalendar core package, the interaction plugin, and any other plugins (like daygrid):

npm install @fullcalendar/core @fullcalendar/interaction @fullcalendar/daygrid

Usage

Instantiate a Calendar with the necessary plugins and options:

import { Calendar } from '@fullcalendar/core'
import interactionPlugin from '@fullcalendar/interaction'
import dayGridPlugin from '@fullcalendar/daygrid'

const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
  plugins: [
    interactionPlugin,
    dayGridPlugin
  ],
  initialView: 'dayGridMonth',
  editable: true, // important for activating event interactions!
  selectable: true, // important for activating date selectability!
  events: [
    { title: 'Meeting', start: new Date() }
  ]
})

calendar.render()