Checks if the current range starts at the same time as the specified range.
Namespace: MindFusion.Scheduling
File: TimeRange.js
JavaScript Copy Code |
---|
function sameStart (range) |
TimeRange. The range of DateTime values to compare to.
Boolean. true if the current range starts at the same time with the specified range; otherwise false.
The following code creates a range at the end of December and checks if the current calendar selection starts at the same time as the holiday range:
JavaScript Copy Code |
---|
var p = MindFusion.Scheduling; // create a new instance of the calendar var selectedRange = calendar.selection.getRange(); var holidayStart = p.DateTime.fromDateParts(2018, 12, 20); var holidayRange = new TimeRange(holidayStart, holidayEnd); if (selectedRange.sameStart(holidayRange)) |