Hello,
We are currently facing an issue when updating a row that contains a date column, the value is not serialized with the right regional format :
In the datasource, we have the value like this (which match our value in database) :
DATE : Thu Jan 26 2023 11:58:08 GMT+0100 (heure normale d’Europe centrale)
It also displays well on the grid with the right regional format, but when we update a cell (not the date column) on this row and using the saveChanges updating grid method, the serialize date looks like this :
DATE : "2023-01-26T10:58:08.000Z"
It doesn't match our database value anymore, it has 1 hour less.
We tried to set enableUTCDates: false, because as it is indicated in the documentation : "It serves the purpose to specify dates serialization." but it doesn't solve the problem, so maybe it doesn't affect the serialized values for updating.
Is there another option to keep the right regional format when serializing updating row values ?
Thank you for the answer.
Sorry maybe I haven't been clear enough to explain my issue : it is not a problem of displaying, the dates are correctly displayed with the right format in our grid. The issue happens only during updating, i will add more informations :
First, we are using editMode as cell (I don't think it has an impact on the problem but you can maybe reproduce it better)
If i adapt your sample with my datasource, it could look like that :
var data = [{ ProductID: 1, ProductName: "ASP.NET Controls", DevelopmentTeam: "Team A", ReleaseDate: new Date("2023-01-26 11:58:08.000"), }];
When i update a cell, then call saveChanges(), i can see that the row datas are sent like this to the web service :
{ProductID: 1,ProductName: "ASP.NET Controls",DevelopmentTeam: "Team A",
ReleaseDate: "2023-01-26T10:58:08.000Z"}
When the row datas are serialized to be send to the web service, the date format is not the same.
I hope it will help you to understand better our problem and maybe have an idea of what can causes this.
Thanks
Hello Vincent,
Thank you for posting into our community!
I have been looking into your question and I have prepared a small sample trying to reproduce the described behavior, however, on my side I was not able to reproduce it and the dates are displayed in the proper format.
Additionally, as I am not sure how the updating is performed on your side and the overall configuration of the igGrid control, in the attached sample I am using batch updating and setting the editMode to row as well as providing a format for the date column. On my side, everything works as expected and the date values are displayed properly.
Here could be found my sample for your reference.
Having this in mind, in order to assist you further, it would be highly appreciated if you could provide me with a sample that demonstrates the behavior on your side.
Having a sample that I can debug on my side will be extremely helpful in finding the root cause of this behavior and providing you with a solution as soon as possible.
Thank you for your cooperation. Looking forward to your reply.
Sincerely,Riva IvanovaAssociate Software Developer