0

I have following configuration for date picker filter above the column.

      if(value.filterable.cell.dataTextField == "creationTime") {
        preparedGridColumnItem.filterable = {
          cell: {
            operator: "eq",
            template: function (arg) {
              arg.element.kendoDateTimePicker({
                format: "dd.MM.yyyy",
                change: function (){
                  console.log("Change :: " + kendo.toString(this.value(), 'd'));
                  var timestamp = moment(this.value()).unix();
                  console.log(timestamp);
                  return timestamp;
                }
              });
            }
          }
        }
      }

Problem is that selected value is send in filter request as non-timestamp value.It means:

"filter": {
        "logic": "and",
        "filters": [
            {
                "operator": "eq",
                **"value": "Wed Apr 15 2015 00:00:00 GMT+0200 (CEST)",**
                "field": "creationTime"
            }
        ]
    }

How can i change selected value to timestamp and how to pass this value to request?

Many thanks for any help.

enter image description here

redrom
  • 11,502
  • 31
  • 157
  • 264
  • Take a look at http://stackoverflow.com/a/11509913/136717. I think this may answer your question. – photo_tom Apr 05 '15 at 18:47
  • Thanks for Your reply but i asked on how to return timestamp value, if You look on my code You will see that i'm able to convert date value to timestamp but i dont know ho to pas converted value into request. – redrom Apr 05 '15 at 18:59

1 Answers1

0

Have you tried with the dataSource parameterMap function? More information is available here:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-transport.parameterMap

knikolov
  • 1,650
  • 1
  • 12
  • 18