I have a simple DataTables grid which contains date columns. I have provided two values for the date in my JSON data set, one for display and one specifically designed so th
+1 JocaPC
I'd like to add to JocaPC's answer by reminding everyone that javascript utilizes zero-indexed arrays.
Example:
HiddenSortString (0) | Date (1) | Some Text (2) ................................................................... 1349035566 | September 30, 2012 2:06 pm | blah blah 1349118137 | October 01, 2012 1:02 pm | blah blah 1349371297 | October 04, 2012 11:21 am | blah blah ...................................................................
To sort the date field using the hidden string you would use the following.
$('.mytable').dataTable({
"aoColumns": [{"bVisible": false},{"iDataSort": 0},null]
});