Hello,I have a strange behaviour when I am creating a row in a cell of type "date".I have formatted the column to have a short date in French format.When I create a new cell, when I leave the cell, it is formatted in English with a Day-1 date stored in the database.
I don't understand.Do you have any suggestions ?
Hello Philippe,
I'm glad that you were able to resolve your issue.
Thank you for choosing Infragistics!
Regards,Ivan Kitanov
Hello Ivan,I have solved the problem. In fact, I used the JSON.stringify statement in the "rowEditDone" method.JSON.stringify changes the time of the date because of UTC with JavaScript.Using the toLocaleDateString() function beforehand, this corrects the date change.
Regards,
Philippe DUFEIL
Hello Phelippe,
I have tried to reproduce this behavior, by using the same date format for the column as well as setting a French locale for the grid, however when a new row is added and the cell with the date is left empty its value is stored as undefined. I believe this might be the reason you are getting Day-1 stored in your database, it might be the way how your database handles undefined values, what it could be done is handling the rowAdded event and checking if the value of the cell is equal to undefined and instead store this value as null or a value that your database could handle.
Here, you can find the sample that I have tested with, please test the sample on your side and let me know if it is able to replicate the scenario that you are facing. In case it doesn’t please modify the sample or provide your own that reproduces the issue.
Looking forward to hearing from you.
Regards, Ivan Kitanov