The 2 most important things to note is that when working with any RadScheduler
- The backend implementation of the RadScheduler is NOT consistent across telerik platforms.
- Kendo UI does NOT support any type server-side processing
Because of the above, I have spent much time struggling with processing the server-side when using the Kendo UI RadScheduler. I saw the recommendations about using ASP.NET RadScheduler, or WinForms RadScheduler, DDay.iCal or iCal.NET.
One of the most frustrating things was the backend storage of the recurrence string did not plug/play into other RadScheduler platforms directly: recurrence string differences, class names, methods, etc. (#1 issue above)
In many forum answers, it just says use DDay.ICal or iCal.NET but there is no sample code. Well here it is for DDay.iCal! I was able to get DDay.iCal to do server-side processing of recurring events. I offer my code up to the community for review and use. Use at own risk.
Please note that I modified that standard Kendo UI backend database structure to include an “Estimated End Date”. It is NULL when the appointment “never” ends. I calculate the value during the appointment save using settings from the recurrence string. As long as I estimate correctly or even if I over-estimate, I am in the clear with my code.
Also note, that my appointments can have multiple people tied to it. Thus, you will see a final “foreach” loop that will flatten out the appointments per person.
My primary goal was to get a list of appointments, per person, within a specified time range so i can send reminder emails.
The AppointmentItem class:
The function call
Database Table tblAppointment
Warning: i am using a beta candidate of DDay.iCal. After going through each type pattern (daily, weekly, monthly, yearly) and each type of pattern (until, first day of, exact day, etc.) I did not encounter any problems.
The only problem is when the appointment is set up "oddly". By that i mean this by way of example. Appointment occurs the 15th of every month. You set the initial date on the 20th of January. Kendo UI RadScheduler correctly does NOT show an entry on Jan 15 or Jan 20. However, DDay will have an occurrence on Jan 20 for your "15th of the month" event. What it boils down to is setting up the appointment skewed from pattern. It is a small risk in general in my application. The worst case scenario is that an even shows when it should not. Probably better than not showing it when it should.