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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filter date and dateTime format data by locale

Thread ID:

Created:

Updated:

Platform:

Replies:

144418 May 6,2019 07:50 AM UTC Jul 26,2019 07:23 AM UTC Angular - EJ 2 4
loading
Tags: Grid
Unknown
Asked On May 6, 2019 07:50 AM UTC

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'



Hariharan J V [Syncfusion]
Replied On May 8, 2019 12:52 PM UTC

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 


Unknown
Replied On June 11, 2019 05:11 AM UTC

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

Hariharan J V [Syncfusion]
Replied On June 15, 2019 12:13 PM UTC

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

Hariharan J V [Syncfusion]
Replied On July 26, 2019 07:23 AM UTC

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon