pull/231/merge
Daniel Leong 10 years ago
commit 84568b70cc

@ -49,7 +49,7 @@ $.fn.dataTable.moment = function ( format, locale ) {
} ); } );
// Add sorting method - use an integer for the sorting // Add sorting method - use an integer for the sorting
types.order[ 'moment-'+format+'-pre' ] = function ( d ) { types.order[ 'moment-'+format ] = function ( d ) {
return d === '' || d === null ? return d === '' || d === null ?
-Infinity : -Infinity :
parseInt( moment( d.replace ? d.replace(/<.*?>/g, '') : d, format, locale, true ).format( 'x' ), 10 ); parseInt( moment( d.replace ? d.replace(/<.*?>/g, '') : d, format, locale, true ).format( 'x' ), 10 );

Loading…
Cancel
Save