New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI Scheduler Visible Range

The .NET MAUI Scheduler exposes VisibleRange property which you can use to get the currently displayed days inside the active view.

  • VisibleRange(IDateRange)—Gets the period/dates range that is currently visible inside the Scheduler view. VisibleRange provides the following properties:
    • Start(DateTime)
    • End(DateTime)

The visible range depends on the view—for some views, such as the Month View, the range is predefined, and for other views, such as the MultiDay View, you can define it through the VisibleDays property.

You can use VisibleRange to get notified when the view is changed as well as when the user navigates through the dates of the active view. For that purpose, subscribe to the PropertyChanged event of the Scheduler and look for VisibleRange changes:

<telerik:RadScheduler x:Name="scheduler"
                      PropertyChanged="Scheduler_PropertyChanged">
    <telerik:RadScheduler.ViewDefinitions>
        <telerik:WeekViewDefinition />
        <telerik:WeekViewDefinition IsWeekendVisible="False" Title="Work Week" />
        <telerik:MultidayViewDefinition VisibleDays="3" Title="3 Day" />
        <telerik:DayViewDefinition />
        <telerik:MonthViewDefinition />
    </telerik:RadScheduler.ViewDefinitions>
</telerik:RadScheduler>

And here is the event handler:

private void Scheduler_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
    if(e.PropertyName == "VisibleRange")
    {
        var startDate = (sender as RadScheduler).VisibleRange.Start;
        var endDate = (sender as RadScheduler).VisibleRange.End;
    }
}

See Also

In this article