Question about repeating appointments when feeding sfschedule with appointments on-demand

Hi!

On Github I found one of your examples using on-demand loading of appointments into sfschedule via a web service. This example loads the appointments for a specific day.

Using sfschedule with repeating appointments I discovered that it does not create the repeating appointments, but generate them on the fly, based on the initial appointment. 

Here comes the question: If I load appointments on-demand (by date) into sfschedule how can I ensure that repeating appointments will show up when the appointment, with the repeating data, is on a previous date?

Example: 
I create a meeting appointment that starts on Monday and is repeated the rest of the week. If I load the appointments on-demand and select Wednesday will I still see the repeated meeting appointment on Wednesday although the appointment with the repeating info is not loaded into sfschedule?

Regards
Flemming Juul

3 Replies 1 reply marked as answer

MS Muniappan Subramanian Syncfusion Team June 16, 2021 01:04 PM UTC

Hi Flemming,  
 
Thank you for contacting Syncfusion support.  
 
We have checked the reported issue “Repeating appointments when feeding sfschedule with appointments on-demand “and it’s working fine from our end. As per the instruction we have followed to check the reported issue and we are unable to replicate the issue from our end. We have checked in the scenario of adding recurrence appointment in the schedule. We have attached the tested sample in the following link,  
 
 
Additional information:  
Tested device: Moto G5 and iPhone simulator 
SfSchedule version: 19.1.0.69 
Xamarin Forms: 4.5.0.617 
 
Please check our sample and let us know if you still facing the same issue? if not, please modify our sample and revert us back with the following details which would be helpful for us to check on it and provide you the solution as soon as possible, 
 
·         Share the issue replicate video.  
·         Share the issue reproducible sample  
·         Share schedule code snippets  
·         Share Syncfusion and Xamarin.Form’s version 
 
Regards,  
Muniappan S 
 



FJ Flemming Juul June 17, 2021 06:47 PM UTC

Hi Muniappan

Thanks for the quick reply.

First of all I maybe should point out that I am not considering this an error or bug, but just trying to understand the possibilities and limitations of the underlying design.

From your enclosed example sfschedule does indeed generate and show repeated appointments, even when their initial appointment is not shown, but that is achieved by adding this initial appointment at every update to the appointment list.

This means that sfschedule will automatically show the repeated appointments based on the recurrencerule of the initial appointment. This also means that you always have to load appointments with a recurrencerule if you want the repeating appointments to show up.

Thanks for making this clear.

Regards
Flemming


MS Muniappan Subramanian Syncfusion Team June 18, 2021 01:11 PM UTC

Hi Flemming, 
 
Thanks for the update. 
 
Based on the shared information, we have checked the reported issue “Repeating appointments when feeding sfschedule with appointments on-demand”. You can achieve your requirement by adding the Recurrence appointment to the Schedule DataSource while loading the OnDemand appointments. You can get the occurrences date time list of recurring appointments from RRULE using the GetRecurrenceDateTimeCollection method of SfSchedule. Please refer the below code snippets to add the recurrence appointment’s on OnDemand, 
 
Code snippet: 
var filteredAppointments = new ObservableCollection<Appointment>(); 
foreach (Appointment App in this.webData) 
{ 
    if (App.RecurrenceRule == null && ((this.visibleDates.First() <= App.StartTime.Date && this.visibleDates.Last() >= App.StartTime.Date) || 
        (this.visibleDates.First() <= App.EndTime.Date && this.visibleDates.Last() >= App.EndTime.Date))) 
    { 
        filteredAppointments.Add(App); 
    } 
    else 
    { 
        if (App.RecurrenceRule != null) 
        { 
            var dateTimeCollection = ScheduleHelper.GetRecurrenceDateTimeCollection(App.RecurrenceRule, App.StartTime, this.visibleDates.First(), this.visibleDates.Last()); 
            if (dateTimeCollection != null && dateTimeCollection.Any()) 
            { 
                filteredAppointments.Add(App); 
            } 
        } 
    } 
} 
 
this.Appointments = filteredAppointments; 
 
 
We hope that this helps you, kindly revert us if you have any concern.  
 
Regards, 
Muniappan S. 
 


Marked as answer
Loader.
Up arrow icon