DateTime formatting doesn't work with SearchBuilder

DateTime formatting doesn't work with SearchBuilder

MyriadMyriad Posts: 2Questions: 1Answers: 0
edited May 2021 in SearchBuilder

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

Answers

  • MyriadMyriad Posts: 2Questions: 1Answers: 0
    edited May 2021

    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'
    });

  • colincolin Posts: 15,177Questions: 1Answers: 2,590
This discussion has been closed.