We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: Xamarin.Forms |
Control: SfSchedule

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.

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment
Wiseman Mbatha
Sep 20, 2016
I don't have this sample in my samples Reply
Nov 01, 2016
Followed the sample and it does work! good job!

My only qeustion regarding this example is how do I allow multiple appointsments on the same time and day?

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile