Articles in this section
Category / Section

How to get the tapped appointment details in Xamarin.Forms Calendar?

1 min read

You can get the tapped appointment details when tapping the month cell by using the OnCalendarTapped event in Xamarin.Forms Calendar.

C#

Get the appointment details in OnCalendarTapped event.

calendar.OnCalendarTapped += Calendar_OnCalendarTapped;
 
private void Calendar_OnCalendarTapped(object sender, CalendarTappedEventArgs e)
{
    var appointmentCollection = e.SelectedAppointment as CalendarEventCollection;
    if (appointmentCollection.Count > 0)
    {
        var appointment = appointmentCollection[0]; ;
        App.Current.MainPage.DisplayAlert(appointment.Subject, appointment.StartTime.ToString("dd/MM/yyyy hh:mm tt"), "OK");
    }
    else
    {
        App.Current.MainPage.DisplayAlert("", "No Events", "OK");
    }
}

View Sample in GitHub

Appointment details

 

 

Conclusion
I hope you enjoyed learning on how to get the tapped appointment details in Xamarin.Forms Calendar.
You can refer to our Xamarin.Forms Calendar feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Xamarin.Forms Calendar example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied