We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Filter date and dateTime format data by locale

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'



4 Replies

HJ Hariharan J V Syncfusion Team May 8, 2019 04:52 AM

Hi AC, 
  
Thanks for contacting Syncfusion support. 
  
We have validated the provided information and we have considered “Need to handle date value based on the server time zone offset”  as a bug. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming patch release, which will be available on end of May.  
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
  
  
Until then we appreciate your patience.  
  
Regards, 
Hariharan 



UN Unknown Syncfusion Team June 10, 2019 09:11 PM

Hello,

when can I expect this change? For now I am using version 17.1.48 but from release notes I can not see that this is done for latests version 17.1.50


HJ Hariharan J V Syncfusion Team June 15, 2019 04:13 AM

Hi AC,

We are sorry for the inconvenience. Due to complexity we are unable to include the fix for the issue as promised. Hence we will include this in the Mid of July patch release. Until then we appreciate your patience.

Regards,
Hariharan


HJ Hariharan J V Syncfusion Team July 25, 2019 11:23 PM

Hi AC,

Thanks for your patience.

We are glad to announce that our Essential JavaScript 2 patch release (17.2.36) has been rolled out successfully and in that release, we have added the fix for an issue “Need to handle date value based on the server time zone offset”.

Regards,
Hariharan

Loader.
Live Chat Icon For mobile
Up arrow icon