Datatable doesn't work on chrome with special case?

Datatable doesn't work on chrome with special case?

genzer_raptorgenzer_raptor Posts: 1Questions: 1Answers: 0
edited October 2016 in Free community support

Hello everyone,
I try to sorting column {{CSS grade}} with link below:

http://jsfiddle.net/5unsbu7a/

The question is why the sorting not run at the last column, how to fix this issue? If I change "a 1" to "a 2" so it work fine.
{{
<tbody>
<tr>
<td>Trident</td>
<td>Internet éxplorer 4.0</td>
<td>Win 95+</td>
<td> 4</td>
<td>c 1</td>
</tr>
<tr>
<td>Trident</td>
<td>Internet êxplorer 5.0</td>
<td>Win 95+</td>
<td>5</td>
<td>a 1</td> =>> if I change to "a 2" (it works)
</tr>
</tbody>
}}

kindly help me .

Answers

  • allanallan Posts: 63,234Questions: 1Answers: 10,417 Site admin

    Somewhat bizzarely Chrome is detected that final column as a date column.

    DataTables uses Date.parse() to validate dates - in Chrome:

    Date.parse("c 1")
    978307200000

    I'm going to have to add some extra protection to stop that. This GitHub issue also tracks that problem.

    Note you are using a very old version of DataTables in your example, although the issue is still present in the current release.

    Allan

This discussion has been closed.