datetime-moment plug not working correctly with locale
datetime-moment plug not working correctly with locale
erwin16
Posts: 14Questions: 5Answers: 1
I am trying to sort diatomite columns as per diatomite plugin documentation, but using international formats
$(document).ready(function() {
$.fn.dataTable.moment( 'LL', locale );
$.fn.dataTable.moment( 'L h:mm', locale );
I have the following defaults :
var langUrl = "//cdn.datatables.net/plug-ins/be7019ee387/i18n/French.json";
if (locale === "en") { langUrl = "//cdn.datatables.net/plug-ins/be7019ee387/i18n/English.json"; }
moment.locale(locale);
$.extend( true, $.fn.dataTable.defaults, {
dom: "<'row'<'col-xs-6'><'col-xs-6'f>r>t<'row'<'col-xs-6'l><'col-xs-6'p>>",
language: { url: langUrl },
searching: true,
ordering: true,
paging: true,
info: false,
select: true
} );
but sorting the date column doesn't gives the expected result....
This discussion has been closed.
Answers
Can you please link to a test case, as per the forum rules, so we can debug the issue.
Allan
Hi Allan , thanks for replying ..
I'll close this issue as I found the error.. I was not using diatomite-moment correctly ...
I am now using
and it works perfectly... error was return "" at the end....