Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
595
Date is one day behind although EnableUtcDates= true
posted

Hi,

My dates in the grid are being displayed one day behind even though I have set the EnableUtcDates(true).

I have enabled UTCDates in my grid model through the MVC GridModel() method like this :

            GridModel GetGridModel(selectedRow) {

            GridModel gridModel = new GridModel();
            gridModel.ID = "MyGrid";
            gridModel.AutoGenerateColumns = false;
            gridModel.PrimaryKey = selectedRow.PrimaryKey;
            gridModel.Width = "100%";
            gridModel.Height = "400px";
            gridModel.EnableUTCDates = true;

    .... ....// other settings

    ..... ...... 

             return gridModel;

               }

1) The date I get from server is 7/1/2012 00:00:00.000 & the grid displays 6/30/2012  (Here the month & day both are decremented because of 1st date)

2) The date I get from server is 11/11/2014 00:00:00.000 & the grid displays 11/10/2014 (Here only the day is decremented)

---------------

This issue is also discussed here but the answer suggests to enable UTCDates feature of the grid.

http://es.infragistics.com/community/forums/t/80982.aspx

I have enabled UtcDates, I am still facing the issue. What am I doing wrong?

Thanks.

Parents
No Data
Reply
  • 18204
    Offline posted

    Hi zep lin,

     

    Thank you for posting in our forums!

    I will need a little more time to investigate why the dates continue to be offset while EnableUTCDates is true.  First, please answer the following questions for me so I may better assist you with this:

    1.) Which version and build of IgniteUI you are using. e.g. 14.1.20141.2249

    2.) How is the Date being passed into the grid?  Are you sending it directly as JSON from the server?

    Looking forward to hearing from you.

Children