Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kendo ui grid date column - control the format of date sent by filter operation

How do we control the format of date sent to the server as a result of applying a Date Filter to a grid column. For example, I have following View

<script type="text/javascript">
    $("#request-grid").kendoGrid({
        dataSource: {
        ...
            schema: {
                model: {
                    fields: {
                        CreatedOn: { type: "date" },
                        ...
                    }
                }
            }
         },
        columns: [{
            field: "Id", title: "Id", width: 20
        }, {
            field: "CreatedOn", title: "Created On", width: 75, format: "{0:dd-MM-yyyy}"
        }, {
            command: ["edit", "destroy"], width: 200
        }],
    });

</script>

With when I try to filter the Date Column (CreatedOn), I see that the parameter is sent in format

Wed Mar 12 2014 00:00:00 GMT+0530 (India Standard Time).

How do I control the format of date that is being sent to server as a result of applying a Date filter on grid column.

I have already followed the procedure of setting culture as described here. Here is how I configured in the Layout page.

kendo.timezones.js and kendo.culture.en-IN.js included through bundle

<script type="text/javascript">
    kendo.culture("en-IN");
</script>

Any advice please.

like image 715
Jatin Avatar asked Dec 31 '25 14:12

Jatin


1 Answers

if chaging the culture is not doing the work. Then the function that you need to use is called parameterMap under the dataSource.transport configuration.

like image 185
Petur Subev Avatar answered Jan 02 '26 12:01

Petur Subev