Documentation
SolutionDeveloperComplianceProjects
  • Getting Started
  • Technology
    • Application Framework
    • Object-Relational Mapping
    • Security Framework
    • Architecture Pattern
    • API Management
  • Environment
    • Development Tool
    • Database Server
    • Web Server
  • PRESENTATION
    • Design Material
    • HTML Helpers
    • Icon Images
    • Custom CSS
    • JQuery Plugin
      • DataTables
      • Tabs
      • Date Picker
      • Calendar
      • Chart
      • Treeview
    • Client Script
      • Open Modal
      • Close Modal
      • Handle return data
      • Load Content
      • Change Hash
      • Change Title
      • Get actual Hash
      • Get Content
      • Update Content
      • Delete Content
      • Get Partial Content
      • Get Partial Content Async
      • Update Partial Content
      • Update Partial Content Async
      • Delete Partial Content
      • Get Action
      • Update Action
      • Delete Action
      • Cascading Dropdown
      • Display Document
    • MVC View
  • BACKEND
    • Base Controller
    • Controller
    • Base Model
    • View Model
    • Class Utility
      • Constant Values
      • Global Properties
      • Option Helper
      • Setting Helper
    • Data Repository
      • Read Columns
      • Read All Columns
      • Read First Record
      • Read by Primary Key
      • Find Record
      • Insert Record
      • Update Record
      • Delete Entity
      • Delete by Criteria
      • Delete by Primary Key
      • Counting Record
      • Check Exist
      • Generate Row-Id
    • Unit Of Work
    • Data Entity
  • Application Features
    • Account Management
    • Navigation Editor
    • Access Control
  • Examples
    • Simple Page
    • Master Detail
    • Editor Template
Powered by GitBook
On this page
  • General information
  • Installation
  • How to use
  • Examples
  • Example 1: Grid
  • Example 2: Toolbar
  • Example 3: Multiple features
  1. PRESENTATION
  2. JQuery Plugin

Calendar

PreviousDate PickerNextChart

Last updated 2 years ago

General information

FullCalendar is a plug-in for the jQuery library that provides a calendar with various interactive features whose layout and functionalities can be customized.

A typical calendar in our applications looks like this:

Installation

  1. Store the downloaded files in the folder "Plugins" > "fullcalendar" (Create the file if it does not exist yet)

  2. Add the following lines in the "Layout.cshtml" file

<link rel="stylesheet" href="~/Plugins/fullcalend
ar/main.css" />
<script type="text/javascript" src="~/Plugins/fullcalendar/main.min.js"></script>

How to use

The simplest form of the calendar is implemented in the following way:

<div id="calendar-id"></div>
<script>

    $(document).ready(function () {

        var calendarEl = document.getElementById('calendar-id');

        var calendar = new FullCalendar.Calendar(calendarEl, {
            ...
        });

    });

</script>

Additional features can be included within the "{ ... }" brackets. In the following, a couple of features are described.

Examples

Example 1: Grid

The following code adds a grid to the Calendar:

initialView: 'dayGridMonth'

Example 2: Toolbar

The following code lets you add features in the header of the calendar:

headerToolbar: {
    left: 'prev',
    center: 'title',
    right: 'next'
}

This particular code adds a "Previous" Button in the left of the header, a "Next" Button in the right of the header and a Title in the center of the header. You can also change the positions of the features by adding them in the line of the respective position.

Example 3: Multiple features

Multiple features are separated by a comma:

initialView: 'dayGridMonth',
headerToolbar: {
    left: 'prev',
    center: 'title',
    right: 'next'
}

The above code lets you add both a grid as well as features in the header of the calendar:

Download latest version of FullCalendar from the following link:

https://github.com/fullcalendar/fullcalendar/releases