Search
TimeUnit Enumeration
See Also
 






Specifies a time resolution.

Namespace: MindFusion.Scheduling
File: Enum.js

 Syntax

JavaScript  Copy Code

// enum
TimeUnit = {}

 Members

  Member name Description

Day

Specifies days.

Hour

Specifies hours.

Minute

Specifies minutes.

Month

Specifies months.

Second

Specifies seconds.

Week

Specifies weeks.

Year

Specifies years.

 Remarks

 Example

The following code sets the time unit of the bottom timeline in a calendar to Days and the count of units between adjacent ticks to 3 (days). 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 ResourceView, which displays the distribution of resources over a period of time
calendar.currentView = p.CalendarView.ResourceView;
calendar.resourceViewSettings.bottomTimelineSettings.unit = p.TimeUnit.Days;
calendar.resourceViewSettings.bottomTimelineSettings.unitCount = 3; 

 See Also