modify date sort to handle failed #405

This commit is contained in:
Philip Kirkbride
2017-07-13 11:56:50 -04:00
parent a555611cc6
commit 18df71924a

View File

@@ -11,8 +11,9 @@
}
$('thead th.date').data('sortBy', function(th, td, tablesort) {
var tdTime = td.text().replace("-", "");
return moment.utc(new Date(tdTime)).unix();
var tdTime = new Date(td.text().replace("-", ""));
if(isNaN(tdTime)) return 0;
else return tdTime;
});
$('input.filter-table').parent('div').removeClass('hide');