Bootstrap Table
HTML
<link rel="stylesheet" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css">
<script src="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.js"></script>
<table id="table" data-sort-name="date" data-sort-order="asc">
<thead>
<tr>
<th data-field="eventdate" data-formatter="commonFormatter" data-sorter="datesort">Date</th>
<th data-field="thing" data-formatter="commonFormatter">thing</th>
<th data-field="thing2" data-formatter="commonFormatter">thing2</th>
</tr>
</thead>
</table>
JavaScript
var data = [
{
"eventdate": '01/14/2017',
"thing": "Hello this is a",
"thing2": "blah blah blah"
},
{
"eventdate": "12/04/2016",
"thing": "Hello this is b",
"thing2": "blah blah blah"
},
{
"eventdate": "05/04/1958",
"thing": "Hello this is c",
"thing2": "blah blah blah"
},
{
"eventdate": "11/23/1960",
"thing": "Hello this is d",
"thing2": "blah blah blah"
},
{
"eventdate": "01/17/2018",
"thing": "Hello this is e",
"thing2": "blah blah blah"
},
{
"eventdate": "01/08/2020",
"thing": "Hello this is f",
"thing2": "blah blah blah"
}
];
function datesort(a,b) {
var x = new Date(a),
y = new Date(b);
if(!isFinite(x-y))
return !isFinite(x) ? 1: -1;
else
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
$(function () {
$('#table').bootstrapTable({
data: data
});
});
function commonFormatter(value) {
return '<div data-field="' + this.field + '">' + value + '</div>';
}