Search
MonthRangeSettings.numberOfMonths Property
See Also
 






Gets or sets the total number of months to be displayed in the MonthRange view.

Namespace: MindFusion.Scheduling
File: MonthRangeSettings.js

 Syntax

JavaScript  Copy Code

get numberOfMonths() {}

 Property Value

Number. The number of months to be displayed in the view.

 Example

The following code uses the monthRangeSettings property of a calendar to assign its value to an html <select> element with an id “numberOfMonths”. Note: the code assumes you have initialized a <div> element with id “calendar” in a web page that references the JavaScript file which contains this code:

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  MonthRange
calendar.currentView == p.CalendarView.MonthRange;

document.getElementById("numberOfMonths").value = calendar.monthRangeSettings.numberOfMonths;

 See Also