KendoUi里的grid显示datetime格式的数据异常问题\data(17998212)\的解决方案

            dataSource: {
                transport: {
                    read: {
                        url: "@Url.Content("~/MyDesk/CaseAnalysisPlatform/GetOfflinePlanList")",
                        dataType: "json",
                        data: {
                            caseId: "@ViewBag.CaseId"
                        },
                        type: "POST"
                    }
                },
                pageSize: 20,
                serverPaging: true,
                serverSorting: true,
                schema: {
                    model: {
                        fields: {
                            CREATEDATE: { type: "date" }
                        }
                    },
                    data: function (response) {
                        return response.Data;
                    },
                    total: function (response) {
                        return response.Total;
                    }
                }
            }
                    field: "CREATEDATE",
                    width: 60,
                    format: "{0: yyyy-MM-dd HH:mm:ss}"

上面两个标红的区域都写上才能设置 grid列里的时间格式。

posted @ 2018-02-01 18:10  星星c#  阅读(491)  评论(0编辑  收藏  举报