我有一个 Kendo UI 数据源,我想通过比较字段来过滤它。这是我的数据源:
var dataSource = new kendo.data.DataSource({
data: [
{ appointment: "Hairdresser", start: new Date("somedate"), end: new Date("somedate")},
{ appointment: "Meeting", start: new Date("somedate"), end: new Date("somedate")},
{ appointment: "Shopping", start: new Date("somedate"), end: new Date("somedate")}
]
});
我想像这样过滤它:
SELECT * FROM dataSource WHERE start > end;
dataSource.filter({
"field": "start",
"operator": "gt",
"value": ?????
});
如何使用过滤器实现这一目标?