JSFiddle - React, Tailwind, and code Playground
by Muthuraman B
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/datetime-moment.js"></script>
<script src="https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css">
<table id="dataTable">
<thead>
<tr>
<th>Id</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>1948-12-08T00:00:05</td>
</tr>
<tr>
<td>2</td>
<td>1948-12-08T00:00:00</td>
</tr>
<tr>
<td>3</td>
<td>1948-12-08T00:00:02</td>
</tr>
<tr>
<td>4</td>
<td>1952-02-19T00:00:00</td>
</tr>
<tr>
<td>5</td>
<td>1953-02-19T00:00:00</td>
</tr>
<tr>
<td>6</td>
<td>2016-02-19T00:00:00</td>
</tr>
</tbody>
</table>
JavaScript
$(document).ready(function() {
//$.fn.dataTable.moment('YYYY-MM-DDThh:mm:ss');
$('#dataTable').dataTable({
responsive: true,
"order": [[ 1, "desc" ]]
});
});