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.
Unfortunately, activation email could not send to your email. Please try again.

Recurrence doesnt work in UWP

Thread ID:

Created:

Updated:

Platform:

Replies:

128537 Jan 26,2017 07:27 PM Jan 30,2017 05:04 AM Xamarin.Forms 4
loading
Tags: SfSchedule
Emil
Asked On January 26, 2017 07:27 PM


Hi,

Code below works in Android but doesnt work in UWP. you can try it as below. you will see that 3 schedules will have same day for each week on UWP. On Android as expected each will be 1 day after another.
 

for (int i = 0; i < 3; i++)
                    {
                        CustomAppointment scheduleAppointment = new CustomAppointment()
                        {
                            Color = Color.FromHex("#FFA2C139"),
                            Subject = i.ToString(),
                            StartTime = DateTime.Now.AddDays(i),
                            EndTime = DateTime.Now.AddDays(i).AddHours(2),
                            IsAllDay = false,
                            IsRecursive = schedule.repeated,
                            Location = schedule.location,
                            Notes = schedule.notes,

                        };
                        if (schedule.totalWeeks > 1)
                            scheduleAppointment.RecurrenceRule = CreateRecurrsiveAppointments(scheduleAppointment.StartTime, scheduleAppointment.EndTime, 4.RecurrenceRule;
                 
                    }

private RecurrenceProperties CreateRecurrsiveAppointments(DateTime StartTime, DateTime EndTime, int totalWeeks)
        {
         
            RecurrenceProperties recurrencePropertiesForAlternativeDay = new RecurrenceProperties();
            recurrencePropertiesForAlternativeDay.RecurrenceType = RecurrenceType.Daily;
            recurrencePropertiesForAlternativeDay.IsDailyEveryNDays = true;
            recurrencePropertiesForAlternativeDay.DailyNDays = 7;
            recurrencePropertiesForAlternativeDay.IsRangeRecurrenceCount = true;
            recurrencePropertiesForAlternativeDay.IsRangeNoEndDate = false;
            recurrencePropertiesForAlternativeDay.IsRangeEndDate = false;
            recurrencePropertiesForAlternativeDay.RangeRecurrenceCount = totalWeeks;
            recurrencePropertiesForAlternativeDay.RecurrenceRule = DependencyService.Get<IRecurrenceBuilder>().RRuleGenerator(recurrencePropertiesForAlternativeDay, StartTime, EndTime);

            return recurrencePropertiesForAlternativeDay;

        }

Emil
Replied On January 26, 2017 07:27 PM

copy paste mistake on the line above

  if (schedule.totalWeeks > 1)
                            scheduleAppointment.RecurrenceRule = CreateRecurrsiveAppointments(scheduleAppointment.StartTime, scheduleAppointment.EndTime, 4).RecurrenceRule;
                 

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 27, 2017 06:11 AM

Hi Emil, 
 
Thank you for your interest in Syncfusion products. 
Based on the provided information, we have checked and we are unable to reproduce the issue ScheduleAppointment RecurrenceRule in Xamarin Forms (UWP) from our side. We have prepared simple sample based on the code example, please find the below sample. 
 
 
 If the given sample doesn’t meet your requirement, could you please revert to us by modifying the provided sample with more information with its replication procedure to reproduce the issue? It will be helpful for us to analyze on it and provide you a better solution.  
 
Regards,  
Subburaj Pandian V.  


Emil
Replied On January 27, 2017 09:21 AM

Hi, 

your sample is not including what i wrote above. Key part there is for loop. I amended your sample and please run this sample on android and uwp local and mobile to see the difference. I create 3 apointments for a week and repeat it for 4 weeks. on android it creates for 3 sequential days but on uwp it will create for same day.

Thanks,

Emil  

Attachment: RecurrenceAppoointment_Sample_d3a3bace.7z

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 30, 2017 05:04 AM

Hi Emil, 
 
Thank you for the update. 
 
We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates. 
 
 
Please let us know, if you have any query.

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.

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.

;