Hello,
In my App, I want to add appointments to SfCalendar. The process I am using is:
1) User clicks on a date, which launches a new Page where they can enter their details.
2) If the user clicks on a date that already has an appointment, the InlineEvent shows, but the new Page is not automatically launched (the user is given a choice to add a new appointment). I achieved this with the following code:
bool Handle_InlineToggled(object sender, Syncfusion.SfCalendar.XForms.InlineToggledEventArgs args)
{
if (args.selectedAppointment.Count() > 0)
{
appointments = true;
}
else
{
appointments = false;
}
return appointments;
}
and then checking this boolHandle_OnCalendarTapped method. Up to here, the code is working very well.
3) The user clicks "save" which writes the data to an SQLite database
4) The user navigates back to the Calendar page, where they can then see the appointment on the Calendar.
I have enabled InlineEvents with calendar.ShowInlineEvents = true. This is causing two issues:
1) When the user clicks on the date, before opening the new Page, the empty InlineEvents momentarily appears (mildly annoying)
2) When the user navigates back from the new Page to the calendar page, the InlineEvents for the day they clicked on is showing (without the scheduled appointment.. it still just shows as empty).
3) The user has to click on the day to close the InlineEvent, then click it again, at which point it becomes populated.
I thought I could fix these issues using the same "appointments" bool that I had used before, and depending on its value, toggle calendar.ShowInlineEvents = true to calendar.ShowInlineEvents = false. However, it appears the Calendar does not update when calendar.ShowInlineEvents is toggled between true and false. It simply is always "true" or "false".
My question is: Can I toggle calendar.ShowInlineEvents dynamically in the code, and have it immediately update the Calendar with my choice? It seems that no matter where I put calendar.ShowInlineEvents, the Calendar defaults to the first instance of calendar.ShowInlineEvents, and does not dynamically change as I toggle from true/false.
Any suggestions would be greatly appreciated!
Thanks,
Dustin