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

Recurring events are not showing initial event

2 Answers 159 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 03 Jun 2014, 03:44 PM
I have the following code:

            var dataSource = new kendo.data.SchedulerDataSource({
                data: response.Data,
                schema: {
                    model: {
                        id: "Id",
                        fields: {
                            Id: { type: "number" },
                            title: { field: "Title", defaultValue: "No title", validation: { required: true } },
                            start: { type: "date", field: "Start" },
                            end: { type: "date", field: "End" },
                            description: { field: "Description" },
                            recurrenceId: { from: "RecurrenceId" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            ownerId: { field: "OwnerID", defaultValue: 1 },
                            isAllDay: { type: "boolean", field: "IsAllDay" }
                        }
                    }
                }
            });

            scheduler.setDataSource(dataSource);

with the following Json:

{"Success":true,"Data":[{"Id":69422,"EventType":"Event","Title":"Event 69422","Start":"\/Date(1401717600000)\/","StartTimezone":null,"End":"\/Date(1401730200000)\/","EndTimezone":null,"Description":null,"IsAllDay":false,"RecurrenceId":null,"RecurrenceRule":"FREQ=YEARLY;COUNT=3;BYMONTH=6;BYMONTHDAY=1","RecurrenceException":null,"EventTitle":"Baseboard \u0026 Paint","AssociatedWithType":"Job","AssociatedWithId":22438,"AssociatedWithName":"A New Hope","JobId":22438,"DisplayJobId":"YNC482","Color":"#5ceed4","Pending":false,"Completed":false,"BackgroundColor":"#c1e4ef","FontColor":"#000000","ResourceDisplay":"Blaire Whiche","Resources":[{"Id":293,"Name":"Blaire Whiche","Available":false,"IsDefaultChecked":false,"Type":null,"Color":null}],"EventDuration":210,"EventDurationWorkDayPixels":47,"MinutesBeforeWorkDayStart":0,"MinutesBeforeWorkDayStartPixels":0,"SummaryHtml":"\u003cdiv class=\"schedulerEvent\" data-eventid=\"69422\" data-eventtype=\"Event\" style=\"display: none;\"\u003e\u003cdiv class=\"schedulerEventName\"\u003eA New Hope (Job)\u003c/div\u003e\u003cdiv class=\"schedulerJobId\"\u003e22438\u003c/div\u003e\u003cdiv class=\"schedulerEventTitle\"\u003eBaseboard \u0026amp; Paint\u003c/div\u003e\u003cdiv class=\"schedulerEventResources\"\u003eBlaire Whiche\u003c/div\u003e\u003cdiv class=\"schedulerToFrom\"\u003e8:00 AM - 11:30 AM\u003c/div\u003e\u003c/div\u003e"}]}

The problem here is that the event is scheduled for 6/2/2014, then recurring every year on the 1st of June for 3 recurrences. 

This should show the initial event on 6/2/2014, then on 6/1/2015, 2016 and 2017.  However, it is not showing the 6/2/2014 event.  If I move the start date to 6/1/2014, it shows up fine. 

Am I doing something wrong here?

2 Answers, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 1
answered on 03 Jun 2014, 04:05 PM
I was able to recreate this on the demo site.

http://demos.telerik.com/kendo-ui/scheduler/index

Steps:

1. Double click on any day, any time to create a new event
2. Change Repeat to Yearly
3. Set the Repeat On: to the previous day
4. Click Save

The initial event which was scheduled for THAT day is nowhere to be found.  It's acting as if the first recurrence is the first event, which is wrong.  If you change the date to the next year, you can see the first occurrence of the event.
0
Vladimir Iliev
Telerik team
answered on 05 Jun 2014, 01:36 PM
Hi Scott,

The current behavior is expected and intended - you can observe the same behavior when creating recurring events for example in Outlook. If you need to make the first occurrence on different date you should first create the recurring event on the desired date (6/1/2014 in your example), and after saving it to create exception for the first occurrence.

Kind Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Scott
Top achievements
Rank 1
Answers by
Scott
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or