Binding Recurrence Exception to Recurrence not working

3 posts, 1 answers
  1. Bruce
    Bruce avatar
    2 posts
    Member since:
    Jan 2013

    Posted 03 Sep 2014 Link to this post

    I understand that if you have a recurrence series, you can edit a single occurrence and show only that exception.
    The important piece of data to bind these together is the RecurrenceId. The original series also contains the RecurrenceException date.

    I went through the online demo and using Dev Tools, I could see the data that is passed between the server and client.
    Like this:

    Exception:
    {"TaskID":122,"OwnerID":1,"Title":"No title 
    (Inherited)","Description":"Inherited","StartTimezone":"","Start":"\/Date
    (1371022200000)\/","End":"\/Date
    (1371031200000)\/","EndTimezone":"","RecurrenceRule":null,"RecurrenceID":121,"RecurrenceExceptio
    n":null,"IsAllDay":false},

    Original Recurrence:
    {"TaskID":121,"OwnerID":1,"Title":"No 
    title","Description":"","StartTimezone":"","Start":"\/Date(1371020400000)\/","End":"\/Date
    (1371034800000)\/","EndTimezone":"","RecurrenceRule":"FREQ=WEEKLY;BYDAY=WE,TH,FR","RecurrenceID"
    :null,"RecurrenceException":"20130612T070000Z;","IsAllDay":false}

    This displays correctly.

    When I try to do the same with my own data, I show two separate events in the scheduler. My data looks like this:

    {"Id":11,"Start":"2014-09-01T08:30:00.000","End":"2014-09-01T16:00:00.000","Title":"Open 
    Hours","ScheduleType":5,"RecurrenceId":null,"RecurrenceRule":"FREQ=WEEKLY;BYDAY=SU,WE,FR,SA","Re
    currenceException":"20140905T070000Z","LocationId":103157,"Description":null,"IsAllDay":false},

    {"Id":12,"Start":"2014-09-05T09:30:00.000","End":"2014-09-05T16:00:00.000","Title":"Open 
    Hours","ScheduleType":5,"RecurrenceId":11,"RecurrenceRule":null,"RecurrenceException":null,"Loca
    tionId":103157,"Description":null,"IsAllDay":false}

    Not sure why this shows as two events. I've tried various formats for my RecurrenceException data (I'm saving start and end as datetime).
    Am I missing something particular here?

    Please advice,

    Thank you






  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 04 Sep 2014 Link to this post

    Hello Bruce,

    Your understanding about the recurrence series and the exception events is absolutely correct. In your case, both events are shown in same day because the recurrenceException value is not defined correctly. It actually tells that events with same start date as the one stored in the recurrenceException field should not be shown. Note that dates in the field are stored in UTC timezone. I believe this is the problem in your data. According the given code snippet date in the recurrenceException is "20130612T070000Z", which converted to your local timezone is different than the start date (2014-09-05T09:30:00.000) of the exception event.
    I prepared a simple Dojo demo, which demonstrates this in action. Check it and let me know if I can be of any further assistance.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Bruce
    Bruce avatar
    2 posts
    Member since:
    Jan 2013

    Posted 04 Sep 2014 in reply to Georgi Krustev Link to this post

    Perfect! That worked. Thank you for the dojo demo. That really helped.

    Thank you,
Back to Top