Hello,
I am using filters on my dateTime format ant I want to pass data to my WebAPI as locale string. I am trying to do it like:
<ejs-grid (actionBegin)="onActionBegin($event)"></ejs-grid>
public onActionBegin(args) {
if (args.requestType == "filtering") {
for (let i = 0; i < args.columns.length; i++) {
if (args.columns[i].type == "datetime") {
args.columns[i].value = args.columns[i].value.toLocaleString();
args.columns[i]["properties"].value = args.columns[i]["properties"].value.toLocaleString();
}
}
}
}
It seems that I get correct data doing it like this but still in my request I am getting data not by locale (time zone is GMT+2 so I am getting data with minus 2 hours from what I need). But I do not what to add hours hardcoded because in other cases it could be GMT+1/GMT+3 or something else.
Now from dateTime like Tue Jan 23 2018 13:41:51 GMT+0200 (eastern European Standard Time) I am getting data in my request like '2018-01-23T11:41:50.000Z' but I want it to be just '2018-02-23T13:41:50.000Z'