Search
Calendar Class
Remarks See Also
 






The Calendar control serves as a view in document-view architecture, where the document is implemented by the Schedule class. The Calendar provides several schedule related views, such as Month, List, Timetable, that present the scheduled events in different styles and layouts.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

// class
Calendar.prototype = {}

 Remarks

The Calendar class exposes the major settings of the calendar. The currentView property lets you specify how the schedule would look: timetable, list, month range etc. The theme property allows you to customize the appearance of the schedule by applying one of the predefined themes or a new one which you have created.

 Example

Below is an example how you create a Calendar in code. The code below assumes you have initialized an HTML <div> element in a webpage with the id "calendar". The newly created calendar uses Timetable view and the "light" theme.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// create a new instance of the calendar
calendar = new p.Calendar(document.getElementById("calendar"));
// set the view to Timetable, which displays the allotment of resources to distinct hours of a day
calendar.currentView = p.CalendarView.Timetable;

calendar.theme = "light";

 Inheritance Hierarchy

MindFusion.Scheduling.UIControl
    MindFusion.Scheduling.Calendar

 See Also