Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81934

Ordering Data Column not working

$
0
0

I have a table that I want to sort by date, but it is not working.
follow the code.

``` if ( $.fn.dataTable.isDataTable( '#tableabertos' ) ) {
table = $('#tableabertos').DataTable();
table.destroy();
}
$(document).ready(function() {
$('#tableabertos').DataTable({

                    "order": [[7 , "desc" ]],
                    "lengthChange": false,
                    "columnDefs": [ {
                        "targets": 0,
                        "orderable": false,
                    } ]

                });
            } );

```

HTML

<thead> <tr> <th><input type="checkbox" id="all_coletados"/></th> <th>ATD.</th> <th>PAC</th> <th>CON</th> <th>SE</th> <th>AG</th> <th>SL</th> <th>CL</th> <th>ST</th> </tr> </thead> <tbody id="tbl_atendimentos_coletados"> <tr> <td style="text-align: center" scope="row"> <input type="checkbox" pac_nome="Test" atd_cod="199999" pac_sexo="M" dt_nasc="19/08/1932" pac_rg="321654" pac_fone="98762132" pac_carteira="32165465" atd_gih="321654" pac_cnv="ASDF" atd_dthr="13/12/2017 11:36:00" dthr="13/12/2017 15:25:10" id="321654"/> </td> <td style="text-align: center">123123</td> <td>TEST</td> <td>ASD</td> <td style="text-align: center"><img src="M.png" height="15px"></td> <td style="text-align: center">85</td> <td style="text-align: center">13/12/2017 11:36:00</td> <td style="text-align: center">13/12/2017 15:25:10</td> <td style="text-align: center; cursor: pointer;background-color: #ee8 !important; color: black !important;" onclick="openDetalhes( '1933145' )">COLETADO</td> </tr> </tbody> </table>~~~~


Viewing all articles
Browse latest Browse all 81934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>