StateSave with serverside restores wrong date value SearchBuilder and ColumnControl
StateSave with serverside restores wrong date value SearchBuilder and ColumnControl
in DataTables
Link to test case: https://intranet2.cimne.com/ws/demo_datatables
With ColumnControl and stateSave: true, a date entered as 06/10/1984 filters correctly. However, after reloading the page, the saved state restores it as 06-10-1984, and Editor PHP sends that value to MySQL, causing an Incorrect DATETIME value error.
SearchBuilder, when input 06/10/1984 doesnt work serverside.
SearchBuilder will also restore the state as 1984-10-06 00:00:00 and the search doesnt work.
I'm using the nigtly build as discussed here:
https://datatables.net/forums/discussion/81852/problem-with-date-type-on-3-0-update#latest
Replies
did a couple tests:
the working value sent when searching for 06/10/1984 is:
columns[2][columnControl][search][value] 1984-10-06T00:00:00.000Z
but after refreshing, state save reloads the value as:
columns[2][columnControl][search][value] 06-10-1984
the column is declared simply as:
and on the server side:
Many thanks for the test case. I'll take a look next week and get back to you.
Allan