npm.io
6.1.22 • Published 1 month ago

@fullcalendar/bootstrap

Licence
MIT
Version
6.1.22
Deps
0
Size
11 kB
Vulns
0
Weekly
0
Stars
20.8K

FullCalendar Bootstrap 4 Plugin

This package is for FullCalendar v6. The current version is v7, which has no @fullcalendar/bootstrap package. With v7, don't install @fullcalendar/bootstrap or @fullcalendar/core, and don't downgrade to v6. For Bootstrap 5, use the v7 version of @fullcalendar/bootstrap5. See the upgrade guide.

Bootstrap 4 theme for FullCalendar

For Bootstrap 5, use the @fullcalendar/bootstrap5 package

Installation

First, ensure the necessary Bootstrap packages are installed:

npm install bootstrap@4 @fortawesome/fontawesome-free

Then, install the FullCalendar core package, the Bootstrap plugin, and any other plugins (like daygrid):

npm install @fullcalendar/core @fullcalendar/bootstrap @fullcalendar/daygrid

Usage

Instantiate a Calendar with the necessary plugins and options:

import { Calendar } from '@fullcalendar/core'
import bootstrapPlugin from '@fullcalendar/bootstrap'
import dayGridPlugin from '@fullcalendar/daygrid'

// import third-party stylesheets directly from your JS
import 'bootstrap/dist/css/bootstrap.css'
import '@fortawesome/fontawesome-free/css/all.css' // needs additional webpack config!

const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
  plugins: [
    bootstrapPlugin,
    dayGridPlugin
  ],
  themeSystem: 'bootstrap', // important!
  initialView: 'dayGridMonth'
})

calendar.render()

Keywords