Search
Calendar Constructor
See Also
 






Initializes a new instance of the Calendar class.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

function Calendar (element)

 Parameters

element

The element this Calendar is associated with.

 Example

Below is an example how you create a Calendar in code. The code below assumes you have initialized an HTML5 Canvas object in a webpage with the id "calendar".

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";

 See Also