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.