Event on month view when changing month.

Hi.
I need event on Month View. Event should be raised when i change month on Header. I know, exist event Header Tapped but i cant see which arrow are clicked, right or left.
I need, update data when displayed month is changed.

1 Reply 1 reply marked as answer

KA Karthikraja Arumugam Syncfusion Team October 12, 2020 10:26 AM UTC

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 


Marked as answer
Loader.
Up arrow icon