is it possible to sort a datatables table by date ascending?
This is my current table ->
I want it to be sorted like a calender in an ascending order, something like the following:
22.01
22.01
...
23.01
...
31.01
01.02
$(document).ready(function () {
$('#example').DataTable({
searching: false,
paging: false,
bInfo: false,
order: [[3, "asc"], [2, "asc"], [1, "asc"]],
columnDefs: [
{
targets: 3,
type: 'date',
className: 'mdl-data-table__cell--non-numeric'
}
]
});
});
This is what I am using right now, i tried type: date-eu
as well.
Thanks in advance!
Update:
I went with something like that, https://datatables.net/plug-ins/sorting/datetime-moment, works fine.
Appreciate the help