如何为日期选择器创建剑道过滤器



我有下面的配置,我在网格中加载数据,所以在这里我在过滤器中添加了日期选择器,但是一旦用户选择日期选择器的值,它就不是过滤器。任何帮助将不胜感激,我不确定我在哪里实施错误。

So far tried code.

config.js

     getall: {
        sortable: true,
        scrollable: false,
        editable: false,
        filterable:{
          extra: false,
          operators: {
              string: {
                  startswith: 'Starts with',
                  eq: 'Is equal to',
                  contains: 'Contains'
              }
          }
      },
        pageable: {
          pageSizes: [10, 20, 30, 40, 50]
      },
        columns: [
    {
                field: 'cycStartDate',
                title: 'Cycle Start',
                width: '300px',
                filterable: {
                  ui: function (element) {
                      'use strict';
                      element.kendoDatePicker({
                          format: 'yyyy-MM-dd'
                      });
                  },
                  operators: {
                      string: {
                          eq: 'Is equal to'
                      }
                  }
              }
              }
]

我不确定它是否有帮助。

{
    field: 'cycStartDate',
    title: 'Cycle Start',
    width: '300px',
    filterable: {
        extra: false,
        operators: {
          string: {
              eq: 'Is equal to'
          }
        },
        ui: function (element) {
          element.kendoDatePicker({
              format: 'yyyy-MM-dd'
          });
        }
    }
}

最新更新