Inline toggle disabled in OnAppearing

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

2 Replies

TC Two Chain May 19, 2018 05:54 PM UTC

Quick update:

This only seems to happen for Android. When I navigate from the new Page back to the Calendar page on the UWP version of this App, the date I clicked on prior to navigating to the new Page is not selected (this is what I want). For some reason, on the Android version, the date is still selected when I navigate back to the Calendar page, and the "InlineEvent" shows nothing until I click away, then click back on it (annoying behavior). Any suggestions?

Thanks!


VA Vinnalan Aravazhi Syncfusion Team May 24, 2018 12:49 PM UTC

Hi Two Chain,

Thanks for contacting Syncfusion support.

Query 1: Inline toggle disabled in OnAppearing and ShowInlineEvents does not dynamically change as I toggle from true/false

We have checked the reported issue and we are able to reproduce the reported issue. Fix will be included in our upcoming 2018 volume 2 Sp 1 release, which will be rolled out by the end of June.

Query 2: Navigate from the new Page back to the Calendar page on the UWP version of this App, the date I clicked on prior to navigating to the new Page is not selected

We have checked the reported issue from our side and we are unable to reproduce the reported issue from our side. we have attached the sample in which we have checked the reported issue from our side. Please find the sample from below link.

Sample: http://www.syncfusion.com/downloads/support/forum/137626/ze/Calendar_Appoointment_Forum28254323 

So, could you please provide the modified sample which replicates the reported issue.

It will help us to provide appropriate solution on this.

Regards,
Vinnalan K A. 


Loader.
Up arrow icon