Hi,
I have two date column in the grid one has date + time(2012-05-11 10:54:00) and the other one only have the date with no time (2012-05-11 00:00:00). I'm setting the datatype of the column to date. The issue is that the column with no time gets display with one day less, 05/10/2012 instead of 05/11/2012. It looks like the grid is substracting a day from the column that has no time.
Thanks
hi,
which version are you using ? Also how do you pass the data source ? do you bind the grid locally, or use the MVC Wrapper. Just FYI, recently we have fixed one issue which is related to date/time shifting (particularly when using the MVC Wrapper, due to the bug in the Microsoft JSON serialization for dates), so this may be the case. In that case you can find the fix in the upcoming SR.
hope it helps. Thanks
Angel
Was this bug ever fixed? We're using version 3.12.1.2202, and the issue still occurs. I believe this is the latest service release?
Hello Josh,
Could you please check if the problem persists when you set the igGrid's option "enableUTCDates" to true?
For more information you can refer to the API Documentation.
Thank you for using Infragistics forums!
Best regards,
Stamen Stoychev
I can't reproduce the issue. I set my local timezone to Eastern and as long as "new Date(1120104000000)" results in "Thu Jun 30 2005 00:00:00 GMT-0400" I see it properly formatted as "6/30/2005" in the grid. In fact all grid does is call getDate() of the date object to return the date. You could check in your browser's console if getDate() returns 29 or 30 for this date object.
enableUTCDates should most likely be set to false if you are not using our server side data binding. Apart from getting the date components using the UTC variants of the date object methods it will also try to find server time offsets in the response and modify the dates according to them.
If you still experience issues, it'll be great if you could provide a small sample I can check to see if I am not missing something.
No, this doesn't help. If the date doesn't have a time, it still displays as one day before.
For example, my JSON response contains "Tcer_eff_end_date": "\/Date(1120104000000)\/". 1120104000000 = Thu Jun 30 2005 00:00:00 GMT-0400 (Eastern Daylight Time), but the date is displayed as 06/29/2005.