DateTime formatting doesn't work with SearchBuilder
DateTime formatting doesn't work with SearchBuilder
Myriad
Posts: 2Questions: 1Answers: 0
Hello there,
I'm trying to localize the table and the search builder to german.
The problem in the moment is to show the correct date in the table (DD.MM.YYYY and sortable) and in the date picker, who is located in the search builder with german localization in the date picker itself.
Thank you in advance!
Here is a preview of my current code:
live.datatables.net/mobutina/1/edit?html,css,js,output
This discussion has been closed.
Answers
Fixed it with these lines of code:
$.extend( true, $.fn.dataTable.DateTime.defaults, {
i18n: {
unknown: '?', hours: 'Stunde', minutes: 'Minute', seconds : 'Sekunde',
previous: 'Davor', next: 'Danach',
months: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
weekdays: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So']
},
locale: 'de'
});
Yep, that's it, here's a working example that might help.
Colin