Kendo ui 自定义剑道日期过滤器和措辞

Kendo ui 自定义剑道日期过滤器和措辞,kendo-ui,kendo-grid,kendo-asp.net-mvc,Kendo Ui,Kendo Grid,Kendo Asp.net Mvc,我正在尝试将日期列的剑道网格过滤器更改为仅状态为“From”和“to”。我找不到使用MVC Razor语法实现这一点的方法 filterable: { extra: false, //do not show extra filters operators: { // redefine the string operators string: { contains: "Contains", startswith: "Starts With",

我正在尝试将日期列的剑道网格过滤器更改为仅状态为“From”和“to”。我找不到使用MVC Razor语法实现这一点的方法

filterable: {
extra: false, //do not show extra filters
operators: { // redefine the string operators
    string: {   
        contains: "Contains",
        startswith: "Starts With",
        eq: "Is Equal To"
    }
}

}

如果您想使用Razor,我猜您使用的是ASP.NET MVC版本,语法是

.Filterable(filterable => filterable
        .Extra(false)
        .Operators(operators => operators
            .ForString(str => str.Clear()
                .StartsWith("Starts with")
                .IsEqualTo("Is equal to")
                .IsNotEqualTo("Is not equal to")

            ))
        )   

谢谢。我遇到了这个,但完全忽略了一件事。我没有看到约会所需的选项。然后意识到示例使用的是字符串类型,一旦我将“.ForString”更改为“.ForDate”,我就看到了我的选项-谢谢-