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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With