Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery.extend( jQuery.fn.dataTableExt.oSort, {
- "date-euro-pre": function ( a ) {
- var x;
- if ( $.trim(a) !== '' ) {
- var frDatea = $.trim(a).split(' ');
- var frTimea = frDatea[1].split(':');
- var frDatea2 = frDatea[0].split('/');
- x = (frDatea2[2] + frDatea2[1] + frDatea2[0] + frTimea[0] + frTimea[1] + frTimea[2]) * 1;
- }
- else {
- x = Infinity;
- }
- return x;
- },
- "date-euro-asc": function ( a, b ) {
- return a - b;
- },
- "date-euro-desc": function ( a, b ) {
- return b - a;
- }
- } );
- var oTable = jQuery('.dataTable').dataTable({
- "iDisplayLength": 10,
- "aaSorting": [[ 1, "asc" ]],
- "bFilter": true,
- "bRetrieve":true,
- "columns" : columnDefs,
- "aoColumns": columnSort,
- "aLengthMenu": [
- [10, 25, 50, 100, -1],
- [10, 25, 50, 100, "tous"]
- ]});
- columnDefs = [null, null, null, null, null, Object { sType="date-euro"}, null, null](ligne 940)
- columnSort = [Object { bSortable=false}, null, null, null, null, null, Object { bSortable=false}, Object { bSortable=false}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement