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

Error in Kendo.Web.min.js when loading Data in SchedulerCannot call method 'getTime' of undefined

4 Answers 194 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dominic
Top achievements
Rank 1
Dominic asked on 05 Sep 2013, 02:03 PM
Hello,

i am evaluating your kendo Ui controls for an web project and got an error while loading data in the kendo scheduler. 
i attached a file of the error stack from chrome to this

this is my javascript file
function showCalendar(userID) {
    var apiUrl = "/svc/pimapi/calendar/" + userID;
 
    $("#scheduler").kendoScheduler({
 
        time: "Europe/Berlin",
        views: ["week", "day", "month"],
        height: 600,
        dataSource: {
            type: "json",
            transport: {
                read: { url: apiUrl }
            },
 
            schema: {
                data: "ResponseItems",
                model: {
                    fields: {
                        Title: { from: "Stichwort", type: "string" },
                        Start: { from: "Terminstart", type: "date" },
                        End: { from: "Terminende", type: "date" },
                        Description: { from: "Memo", type: "string" }
                    }
                }
            }
        }
 
    });
}

some sample data: 

{"ResponseItems":[{"Stichwort":"test","Terminstart":"04.09.2013 16:00:00","Terminende":"04.09.2013 16:30:00","Memo":"testtest","Art":"T2"},{"Stichwort":"testtest","Terminstart":"05.09.2013 12:00:00","Terminende":"05.09.2013 13:00:00","Memo":"testetestetst\r\n\r\nPARTY","Art":"T1"}]}


maybe you could help me showing some appointments in my scheduler?


regards
Dominic

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 05 Sep 2013, 02:46 PM
Hi Dominic,

 This error is caused by the fact that your event schema is changing the case of the model fields. The scheduler expects the fields to be called "start", "end" etc. instead of "Start", "End". After changing that you need to also include the German culture file so Kendo UI can parse Dates in German format. More info about cultures is available here.

 I created a live demo which is based on your setup and seems to work as expected: http://jsbin.com/IKuqEse/1/edit

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dominic
Top achievements
Rank 1
answered on 16 Sep 2013, 12:42 PM
Hello Atanas,

thanks for help. its works now very well


best regards
Dominic
0
jonno
Top achievements
Rank 1
answered on 16 Sep 2013, 11:36 PM
Atanas,
Regards your live demo (http://jsbin.com/IKuqEse/1/edit) it seems that in both week mode and day mode the calendar dates are displayed in month/day format whereas the culture (de-DE) specifies day/month format. Sames goes for en-GB, en-AU etc which expect day/month format and are displayed month/day.  Similarly, the calendar displays Sunday as 1st day of week when culture info specifies Monday.

0
Atanas Korchev
Telerik team
answered on 17 Sep 2013, 06:19 AM
Hi Jonathan,

 Unfortunately none of the default date patterns available in the culture info fits the requirements for the date headers. This is why they do not change when you change the culture.

 Fortunately there is a way to customize that via the dayHeaderTemplate option. Here is the updated demo: http://jsbin.com/IKuqEse/2/edit

 First day of week will be properly handled with our upcoming service pack release which is due till the end of the week.

Regards,
Atanas Korchev
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
Dominic
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Dominic
Top achievements
Rank 1
jonno
Top achievements
Rank 1
Share this question
or