Documentation
Getting Started
NPM and ES6 Module Imports
Install FullCalendar version 5.X core package and all the plugins you want to use:
$ npm install @fullcalendar/core@^5.5.0 @fullcalendar/daygrid@^5.5.0 –-save
Install SwipeCalendar:
$ npm install swipecalendar –-save
Import SwipeCalendar and its FullCalendar’s plugins dependencies:
import dayGridPlugin from '@fullcalendar/daygrid'; import SwipeCalendar from 'swipecalendar';
Add a placeholder in your HTML:
<div id='calendar'></div>
Initialize SwipeCalendar:
document.addEventListener('DOMContentLoaded', function() { var calendarEl = document.getElementById('calendar'); calendar = new SwipeCalendar(calendarEl, { // SwipeCalendar specific options swipeLicenseKey: 'XXXXX-XXXXX-XXXXX-XXXXX', swipeEffect: 'slide', swipeSpeed: 250, swipeTitlePosition: 'center', // FullCalendar options and callbacks plugins: [dayGridPlugin], height: '100%', }); });
Manual Installation
Download FullCalendar version 5.X from its GitHub repository.
Download SwipeCalendar from the dist folder of its GitHub repository.
Include FullCalendar’s CSS and JS files in your HTML:
<link href='fullcalendar/main.css' rel='stylesheet' /> <script src='fullcalendar/main.js'></script>
Include the SwipeCalendar JS file in your HTML:
<script src='dist/swipeCalendar.min.js'></script>
Add a placeholder in your HTML:
<div id='calendar'></div>
Initialize SwipeCalendar:
document.addEventListener('DOMContentLoaded', function() { var calendarEl = document.getElementById('calendar'); calendar = new SwipeCalendar(calendarEl, { // SwipeCalendar specific options swipeLicenseKey: 'XXXXX-XXXXX-XXXXX-XXXXX', swipeEffect: 'slide', swipeSpeed: 250, swipeTitlePosition: 'center', // FullCalendar options and callbacks initialView: 'dayGridMonth', height: '100%', }); });
SwipeCalendar Options
SwipeCalendar supports the same API as FullCalendar. This means that you can initialize SwipeCalendar with the same options and callbacks used in FullCalendar.
For the list of available options, please refer to the FullCalendar documentation.
In addition to the FullCalendar options, SwipeCalendar also defines the following options:
Name | Type | Description |
---|---|---|
swipeLicenseKey | String | The SwipeCalendar license key. Without a valid license key, SwipeCalendar will run in trial mode. Entering a valid license key will automatically remove the credit link to SwipeCalendar.io located at the bottom of the calendar. |
swipeSpeed | String | Duration in milliseconds of the transition between calendar views (Default is 250) |
swipeTitlePosition | String | Position of the title within the sliding view part. Value can be 'left', 'center', and 'right' (Default is 'center'). Any other specified value means that the title will not be included in the sliding view part. |
swipeEffect | String | Swipe Transition Effect. Value can be 'slide', 'cube', and 'coverflow' (Default is 'slide'). |