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?
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?