Hey everyone,
i'm facing a problem with the scheduler. I've made a sample with two events, one in timezone "Europe/Berlin" and one in "America/Los Angeles". Both events are starting at 09:00 AM and end at 12:00 AM on 28.05.2014. Both are shown correctly in the scheduler overview (the LA event -9 hours prior to the Berlin event which is correct).
But when I open the LA event for editing, the time gets messed up (9 hours are substracted from the start and end time which moves the event to 27.05.2014). Editing the Berlin event shows the correct time in the edit dialog.
My local timezone is Europe/Berlin and i'm using KendoUI Q1 2014.
Here's the example code which reproduces the problem for me:
Any ideas whats wrong?
Regards,
Michael
i'm facing a problem with the scheduler. I've made a sample with two events, one in timezone "Europe/Berlin" and one in "America/Los Angeles". Both events are starting at 09:00 AM and end at 12:00 AM on 28.05.2014. Both are shown correctly in the scheduler overview (the LA event -9 hours prior to the Berlin event which is correct).
But when I open the LA event for editing, the time gets messed up (9 hours are substracted from the start and end time which moves the event to 27.05.2014). Editing the Berlin event shows the correct time in the edit dialog.
My local timezone is Europe/Berlin and i'm using KendoUI Q1 2014.
Here's the example code which reproduces the problem for me:
<
div
id
=
"scheduler"
></
div
>
<
script
src
=
"javaSources/js/jquery.min.js"
></
script
>
<
script
src
=
"javaSources/js/kendo.all.js"
></
script
>
<
script
src
=
"javaSources/js/kendo.timezones.js"
></
script
>
<
script
src
=
"javasources/js/cultures/kendo.culture.de-DE.js"
></
script
>
<
script
type
=
"text/javascript"
>
kendo.culture("de-DE");
</
script
>
<
script
>
$(function () {
"use strict";
var dsScheduler = new kendo.data.SchedulerDataSource({
data: [
{ "Description": "", "End": "\/Date(1401271200000)\/", "IsAllDay": false, "PublicEvent": false, "Start": "\/Date(1401260400000)\/", "StartTimezone": "Europe\/Berlin", "TaskId": 30, "Title": "No title" },
{ "Description": "", "End": "\/Date(1401271200000)\/", "IsAllDay": false, "PublicEvent": false, "Start": "\/Date(1401260400000)\/", "StartTimezone": "America\/Los_Angeles", "TaskId": 32, "Title": "No title" }
],
schema: {
//timezone: "Europe/Berlin", // nicht setzen, damit Termin aus verschiedenen Zeitzonen auch korrekt angezeigt werden!!
model: {
id: "taskId",
fields: {
taskId: { from: "TaskID", type: "number", defaultValue: -1 },
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
startTimezone: { from: "StartTimezone", defaultValue: "Europe/Berlin" },
endTimezone: { from: "EndTimezone" },
description: { from: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
isAllDay: { type: "boolean", from: "IsAllDay", defaultValue: false }
}
}
}
});
var kScheduler = new kendo.ui.Scheduler($("#scheduler"), {
dataSource: dsScheduler,
//timezone: "Europe/Berlin", // nicht setzen, damit Termin aus verschiedenen Zeitzonen auch korrekt angezeigt werden!!
height: 500,
views: [
"day",
"week",
{ type: "month", selected: true },
"agenda"
]
});
});
</
script
>
Any ideas whats wrong?
Regards,
Michael