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"); } }
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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!