This is a migrated thread and some comments may be shown as answers.

GetAppointmentsInRange Fail on Recurrence

1 Answer 64 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mickey
Top achievements
Rank 1
Mickey asked on 05 Aug 2010, 03:33 PM
Hi,
I'm trying to avoid duplicate appointments
I have created an appointment with Recurrence "weekly" that end after 5 occurrences, 1/8/2010 08:00 - 09:00
and it is being created OK
1/8/2010 08:00 - 09:00
8/8/2010 08:00 - 09:00
15/8/2010 08:00 - 09:00
22/8/2010 08:00 - 09:00
29/8/2010 08:00 - 09:00

now I create another appointment that overlap one of the re occurrence instance  for example  "8/8/2010 08:00 - 09:00" ,
I'm using the GetAppointmentsInRange to check for duplicates,
on the first and last occurrence it found a match,
on the middle occurrences it fail to find a match,
I have the same problem also when trying to create a new event with recurrence, that start at "8/8/2010 08:00 - 09:00" with weekly recurrence that end after 3 occurrences (I loop through the occurrences to check)

I'm using 2009 Q2

Please advise,
Mickey

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 Aug 2010, 10:02 AM
Hi Mickey,

This problem does not have a straight-forward and simple solution and that's why we've decided to keep the examples simple and understandable.

You have to be aware that occurrences set to repeat indefinitely are very hard, if not impossible, to check for overlaps. The recommended solution is to limit the verification to a reasonable time period - say one month ahead of now. 

Attached is a sample solution that takes both resources and occurrences into account.


All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Mickey
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or