We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When using GetRecurrenceDateTimeCollection if the RRule passed in does not contain a "COUNT=x" then the recurrence will not return anything

Thread ID:

Created:

Updated:

Platform:

Replies:

143901 Apr 10,2019 03:28 AM UTC Apr 12,2019 08:39 AM UTC Xamarin.Forms 4
loading
Tags: SfSchedule
Akin Goktepe
Asked On April 10, 2019 03:28 AM UTC

As I was manually getting the Recurrences, I was using the SyncFusion method of GetRecurrenceDateTimeCollection, to get the recurrences within the visible range of the SfSchedule.

I noticed that when using this method the RRule for an indefinite recurrence, never returns any appointments, in v17.1.0.40.

For example an RRule of: FREQ=WEEKLY;BYDAY=TU;INTERVAL=2 will not return any values
whereas an RRule of: FREQ=WEEKLY;BYDAY=TU;INTERVAL=2;COUNT=5 will return values.

I noticed in v17.1.0.32 there was apparently a fix for this using NoEndDate, is this a value I need to pass in or something?

Cheers, Akin

Deivaselvan Y [Syncfusion]
Replied On April 10, 2019 01:09 PM UTC

Hi Akin, 
 
Thank you for contacting Syncfusion support. 
 
We have analyzed the reported behavior “GetRecurrenceDateTimeCollection method doesn’t return any data when the NoEndDate recurrence set” and it works fine as expected from our end, we have prepared a simple and added an recurrence appointment by using the rule you have mentioned and it works fine as expected in all the applicable view. 
 
To get the data for the required range you need to pass the range start date and range end date to the GetRecurrenceDateTimeCollectionMethod. 
 
In our sample we have get the recurrence date time collection for the visible date ranges by using the VisibleDatesChangedEvent, and in this event we have pass the visibledate range from the VisibleDatesChangedEventArgument, and we have pass the start range by modifying the time to start of the day as it returns the current time as the value and the appointment start time may fall before the time. 
 
Code snippet: 
C# 
 
private void Schedule_VisibleDatesChangedEvent(object sender, VisibleDatesChangedEventArgs e) 
        {  
            var app = (schedule.DataSource as ScheduleAppointmentCollection)[0]; 
            var startDate = e.visibleDates[0].Date; 
            var endDate = e.visibleDates[e.visibleDates.Count - 1]; 
            var appointments = schedule.GetRecurrenceDateTimeCollection(app.RecurrenceRule, app.StartTime, startDate, endDate); 
        } 
 
Sample: Schedule 
 
Note: As you mentioned we have included this fix in our Volume 1 Beta release version 17.1.0.32, hence kindly update to our latest version to resolve the issue. 
 
If the sample doesn’t meet your requirement, kindly revert us by modifying the sample and share more details and replication procedure which help us to analyze and resolve the reported issue. 
 
Regards, 
Deivaselvan 


Akin Goktepe
Replied On April 12, 2019 01:57 AM UTC

Hi Deivaselvan,

I've used your sample and narrowed down the problem.

I've been following the instructions in the following link: https://help.syncfusion.com/xamarin/sfschedule/recurrence

Our implementation looks something like follows:


var occurences DependencyService.Get<IRecurrenceBuilder>(DependencyFetchTarget.GlobalInstance).GetRecurrenceDateTimeCollection(appointment.RecurrenceRule, appointment.StartDate, rangeStartDate, rangeEndDate);

where the rangeStartDate is the first day of the current month, and the rangeEndDate is the last day of the current month.

Even when using the following 

var occurences DependencyService.Get<IRecurrenceBuilder>(DependencyFetchTarget.GlobalInstance).GetRecurrenceDateTimeCollection(appointment.RecurrenceRule, appointment.StartDate);

I still get no values, unless I have a "COUNT=x" as part of the RRule being passed in (appointment.RecurrenceRule)

Thanks, Akin

Akin Goktepe
Replied On April 12, 2019 06:29 AM UTC

Hi Deivaselvan,

I've figured out the problem. My host application was running a lower version of SyncFusion, it works as expected after upgrading the host app to 17.1.0.40

Thanks, Akin

Subburaj Pandian Veluchamy [Syncfusion]
Replied On April 12, 2019 08:39 AM UTC

Hi Akin,   
     
Thank you for the update. We are happy that the mentioned issue resolved at your end. 
 
Please get in touch with us if you would require any further assistance. 
 
Regards,
Subburaj Pandian V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon