我的代码:
$(document).ready( function () {
$('#tableEventos').dataTable({
'columnDefs': [
{ 'targets': [5, 6], 'orderable': true, 'type': 'date-eu' }
]
});
$('#tableEventos').DataTable();
} );
字符串格式的API响应日期,如下所示:
{
//other data...
"dtInicialEvento": "26/09/2018",
"dtFinalEvento": "26/09/2018"
//other data...
}
其他配置可以正常使用,但排序日期仍然不适合我。我究竟做错了什么?
我正在查找以下文档:https://datatables.net/plug-ins/sorting/
ps:我正在使用Angular5 +