Skip to main content

ASPxClientScheduler.GetVisibleIntervals Method

Returns a collection of time intervals displayed by the ASPxScheduler.

Declaration

GetVisibleIntervals(): ASPxClientTimeInterval[]

Returns

Type Description
ASPxClientTimeInterval[]

An array of visible intervals.

Remarks

The GetVisibleIntervals method is equivalent to the SchedulerViewBase.GetVisibleIntervals method of the ASPxScheduler.

Note

The GetVisibleIntervals method returns intervals in client time zone.

function PrintVisibleInterval(s,e) {
    var visibleIntervals = scheduler.GetVisibleIntervals();
    var count = visibleIntervals.length;
    var resultString = (count > 0)? "" : "empty";
    for (var i = 0; i < count; i++) {
        var interval = visibleIntervals[i];
        resultString += interval.GetStart() + " - " + interval.GetEnd();
        resultString += "<br/>"
    }
    document.getElementById("lbInterval").innerHTML = resultString;
}
<dx:ASPxScheduler ID="ASPxScheduler1" runat="server" ClientInstanceName="scheduler">
    <ClientSideEvents VisibleIntervalChanged="PrintVisibleInterval" Init="PrintVisibleInterval" />
</dx:ASPxScheduler>
See Also