Hi Marcin,
Thank you for contacting Syncfusion support.
We would like to inform you that you can use ViewChanged event of SfScheduler on month change, the event will trigger on month change using swipe or navigation buttons. The ViewChanged event is applicable for all ScheduleViews, from which you can get current view and previous view dates.
Please refer below code snippet for the same,
[Xaml]
<syncfusion:SfScheduler x:Name="Schedule"
ViewType="Month"
ViewChanged="Schedule_ViewChanged"/>
[c#]
private void Schedule_ViewChanged(object sender, ViewChangedEventArgs e)
{
if (e.NewValue != null)
{
var currentViewStartDate = e.NewValue.StartDate;
var currentViewEndDate = e.NewValue.EndDate;
var currentMonthStartDate = e.NewValue.ActualStartDate;
var currentMonthEndDate = e.NewValue.ActualEndDate;
}
if (e.OldValue != null)
{
var previousViewStartDate = e.OldValue.StartDate;
var previousViewEndDate = e.OldValue.EndDate;
var previousMonthStartDate = e.OldValue.ActualStartDate;
var previousMonthEndDate = e.OldValue.ActualEndDate;
}
} |
We hope this helps. Please let us know if you need any further assistance.
Regards,
Karthik Raja A