Kendo Schedular Uncaught TypeError:无法读取未定义的属性'getTimezoneOffset'

时间:2018-10-03 12:57:00

标签: kendo-ui kendo-scheduler

<script>
$("#scheduler").kendoScheduler({
        startTime: new Date("@DateTime.Now"),
        height: 600,
        views: [
            "day",
            { type: "workWeek", selected: true },
            "week",
            "month",
            "agenda",
            { type: "timeline", eventHeight: 50}
        ],
        timezone: "Etc/GMT",
        date: new Date("@DateTime.Now"),
        dataSource: {
            batch: true,
            transport: {
                read: {
                    url: url + "read",
                    dataType: "json",
                    type: "GET"
                },
                update: {
                    url: url + "update",
                    dataType: "json",
                    type: "POST"
                },
                create: {
                    url: url + "create",
                    dataType: "json",
                    type: "POST"
                },
                destroy: {
                    url: url + "destory",
                    dataType: "json",
                    type: "POST"
                },
                parameterMap: function (options, operation) {
                        return {
                            models: options.models, 
                        };
                    }
            },
            schema: {
                model: {
                    id: "ID",
                    fields: {
                        ID: { from: "ID", type: "number" },
                        Title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                        Start: { type: "datetime", from:"Start" , format: "{0:dd-MM-yyyy}"},
                        End: { type: "datetime", from: "End", format: "{0:dd-MM-yyyy}" },
                        Description: { from: "Description" },
                        UserID: { from: "UserID", defaultValue: 1 },
                        IsAllDay: { type: "boolean", from: "IsAllDay" }
                    }
                }
            },
            filter: {
                logic: "or",
                filters: [
                    { field: "UserID", operator: "eq", value: 1 },
                    { field: "UserID", operator: "eq", value: 2 }
                ]
            }
        },
        resources: [
            {
                field: "UserID",
                title: "Owner",
                dataSource: [
                    { text: "Alex", value: 1, color: "#f8a398" },
                    { text: "Bob", value: 2, color: "#51a0ed" },
                    { text: "Charlie", value: 3, color: "#56ca85" }
                ]
            }
        ]
            });
</script>

大家好,

根据kendo UI计划中的date属性,我遇到了这个问题!它一直在说它是未定义的,但是我真的很确定我定义了它,如您所见。我已经搜索了一段时间,但是我仍然没有找到答案!也许有人可以帮助我?我可以提供您想看到的所有内容!

0 个答案:

没有答案