/ Published in: PHP
Personalized plugin for order datatables with spanish date dd/mm/yyyy hh:mm
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery.fn.dataTableExt.oSort['fechaes-asc'] = function(a,b) { return ((date_a < date_b) ? -1 : ((date_a > date_b) ? 1 : 0)); }; jQuery.fn.dataTableExt.oSort['fechaes-desc'] = function(a,b) { return ((date_a < date_b) ? -1 : ((date_a > date_b) ? 1 : 0)); };