Merge pull request #430 from AlexDEVpro/sorting

Update datetime-moment plugin. Add a Boolean parameter that allows to…
pull/432/head
Allan Jardine 6 years ago committed by GitHub
commit e5c9311729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,7 @@
}
}(function ($, moment) {
$.fn.dataTable.moment = function ( format, locale ) {
$.fn.dataTable.moment = function ( format, locale, reverseEmpties ) {
var types = $.fn.dataTable.ext.type;
// Add type detection
@ -66,7 +66,7 @@ $.fn.dataTable.moment = function ( format, locale ) {
}
return !moment(d, format, locale, true).isValid() ?
Infinity :
(reverseEmpties ? -Infinity : Infinity) :
parseInt( moment( d, format, locale, true ).format( 'x' ), 10 );
};
};

Loading…
Cancel
Save