Hello,
I have been trying to use SfCalendar, but I am unable to get any response when I click on any dates. I have been trying to follow the documentation, and am confused why the following doesn't work:
C# Code:
public MainPage()
{
InitializeComponent();
SfCalendar calendar = new SfCalendar();
this.Content = calendar;
}
private void Handle_OnCalendarTapped(object sender, Syncfusion.SfCalendar.XForms.CalendarTappedEventArgs args)
{
SfCalendar calendar = args.Calendar;
DateTime date = args.datetime;
System.Diagnostics.Debug.WriteLine("Works");
DisplayAlert("test", "testing", "Yes", "No");
}
Associated XAML:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:App1"
xmlns:calen = "clr-namespace:Syncfusion.SfCalendar.XForms;assembly=Syncfusion.SfCalendar.XForms"
x:Class="NAGs.MainPage"
Title = "Calender Control by Synufusion">
<calen:SfCalendar x:Name="Calender"
OnCalendarTapped="Handle_OnCalendarTapped"/>
</ContentPage>
As you can see from the simple code, I just want to have an alert (or debug line) appear when I click on the date so I know it is working. What am I doing wrong?
Thanks,
Dustin