Documentation v1.0.6

Preview Upgrade to Pro
Fullcalendar is the most popular Javascript Calendar. It's powerful and lightweight and suitable for just about anything. For more info see the official siteand the Github repository.

Background Events Example

Display background events. Also, control where events are allowed to go:
  • Green areas are allowed for every event
  • Red areas are not allowed for every event
  • Meeting event is only allowed on green areas
// Define colors
var green =  KTUtil.getCssVariableValue("--bs-active-success");
var red =  KTUtil.getCssVariableValue("--bs-active-danger");

// Initialize Fullcalendar -- for more info please visit the official site: https://fullcalendar.io/demos
var calendarEl = document.getElementById("kt_docs_fullcalendar_background_events");

var calendar = new FullCalendar.Calendar(calendarEl, {
    headerToolbar: {
        left: "prev,next today",
        center: "title",
        right: "dayGridMonth,timeGridWeek,timeGridDay,listMonth"
    },
    initialDate: "2020-09-12",
    navLinks: true, // can click day/week names to navigate views
    businessHours: true, // display business hours
    editable: true,
    selectable: true,
    events: [
        {
            title: "Business Lunch",
            start: "2020-09-03T13:00:00",
            constraint: "businessHours"
        },
        {
            title: "Meeting",
            start: "2020-09-13T11:00:00",
            constraint: "availableForMeeting", // defined below
            color: green
        },
        {
            title: "Conference",
            start: "2020-09-18",
            end: "2020-09-20"
        },
        {
            title: "Party",
            start: "2020-09-29T20:00:00"
        },

        // areas where "Meeting" must be dropped
        {
            groupId: "availableForMeeting",
            start: "2020-09-11",
            end: "2020-09-11",
            display: "background",
        },
        {
            groupId: "availableForMeeting",
            start: "2020-09-13",
            end: "2020-09-13",
            display: "background",
        },

        // red areas where no events can be dropped
        {
            start: "2020-09-24",
            end: "2020-09-28",
            overlap: false,
            display: "background",
            color: red
        },
        {
            start: "2020-09-06",
            end: "2020-09-08",
            overlap: false,
            display: "background",
            color: red
        }
    ]
});

calendar.render();
<div id="kt_docs_fullcalendar_background_events"></div>
Upgrade To Pro
Pro Version Benefits Free Pro
UI Elements 20 100
In-house Components 20 40
Crafted Pages 5 20
Complete Documentation
Product Support
Layout Builder
Source Vectors
Email Templates
Calendar App
User Management App
Chat App
Customers App
Upgrade to Jet HTML Free
Learn & Get Inspired

Support at devs.keenthemes.com

Join our developers community to find answer to your question and help others. FAQs
Get Support
Documentation
From guides and how-tos, to live demos and code examples to get started right away.
Plugins & Components
Check out our 300+ in-house components and customized 3rd-party plugins.
Layout Builder
Build your layout, preview it and export the HTML for server side integration.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now