Articles in this section
Category / Section

How to get date and appointment details while tapping view header ?

1 min read

In SfSchedule, you can get the selected date details in view header of Schedule using ViewHeaderTapped event which will be fired while tapping date in the view header panel.



       x:Name="schedule" ScheduleView="WeekView" 
       VerticalOptions="FillAndExpand" >


In ViewHeaderTapped, DateTime of the selected date in the view header panel will be known. Selected date time will be known for all the schedule views. In month view, the dates in the first row (row immediate below the view header) will be known in the DateTime parameter in the event.



  schedule.ViewHeaderTapped += Schedule_ViewHeaderTapped;
   void Schedule_ViewHeaderTapped(object sender, ViewHeaderTappedEventArgs e)
          //date of the selected item. 
          var dateTime = e.DateTime;


You can also switch schedule views by setting the required ScheduleView type in the ViewHeaderTapped event.



You can download the source code for entire demo of switching schedule view through event from here, ScheduleSample.

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Please sign in to leave a comment