【问题标题】:Kendo Filter is Not Working on the Date Column剑道过滤器不适用于日期列
【发布时间】:2016-02-17 13:21:27
【问题描述】:

我有一个带有日期列的网格,我在其中应用了可过滤选项,但过滤时没有得到任何结果。

我的网格:

var element = $("#grid").kendoGrid({
                dataSource: {
                    data: gridDataSource,
                    schema: {
                        model: {
                            fields: {
                                Date: { type: "date", editable: false },
                            }

                        }

                    }

                },
                scrollable: true,
                filterable : true,

                columns: [
               {
                "field": "Date", "title": "Date", "format": "{0:MM/dd/yyyy}", filterable : {ui: function (e) {e.kendoDatePicker({format: "MM/dd/yyyy"})}},  width: "100px" }],

            });

【问题讨论】:

    标签: asp.net-mvc kendo-ui datepicker kendo-grid


    【解决方案1】:

    kendogrid() 声明末尾可能缺少 .data("kendoGrid");

    为了方便起见,我做了一个 working example

    希望有帮助

    ps:在示例中按 1966/01/27 过滤以进行检查。

    【讨论】:

    • 从您的示例中删除 .data("kendoGrid");这段代码,但这工作正常,在我的代码中添加“.data(“kendoGrid”);”这不起作用。
    • This working example 等于您的配置,问题可能是您的数据,您可以显示 json 吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-28
    • 1970-01-01
    相关资源
    最近更新 更多