Unfortunately, the date picker needs to be changed manually through our code. Our developers will include a different date picker in the future, but at the moment you'll need to follow these instructions:
This is an example for German/
1. Open ../wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.funcs.js and add this code under the comments "Apply datetimepicker" around line 147:
moment.locale('de', { months : ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"], monthsShort : ["jan", "feb", "mär", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "dez"], weekdaysMin : ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], week : { dow : 1 // Monday is the first day of the week }});
Then, below that find this line of code around line 169:
The last step is to go to main settings of wpDataTables, under Custom JS and CSS tab, and disable the "Use minified wpDataTables Javascript" check-box.
Hello
My WP install is configured to use French language and Monday as the first day of the week. French language is also selected in WPDT parameters.
Despite that, the datepicker in the tables is in English and the week starts on Sunday.
Is there a way to fix this ?
Thank you.
Hello Clément
Unfortunately, the date picker needs to be changed manually through our code. Our developers will include a different date picker in the future, but at the moment you'll need to follow these instructions:
This is an example for German/
1. Open ../wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.funcs.js and add this code under the comments "Apply datetimepicker" around line 147:
Then, below that find this line of code around line 169:
And modify it to look like this (add "locale: 'de' "):
Do not forget to add a comma ( , ) after " useCurrent: false " (see code above). If you forget that, this will not work.
Then, do the same for around line 183 (add "locale: 'de' "):
Again, do not forget to add a comma ( , ) after " useCurrent: false " (see code above). If you forget that, this will not work.
2. Open ../wp-content/plugins/wpdatatables/source/class.wdttools.php and around line 1469 add the following line of code:
So it should look like this in the end:
This also changes the datepicker starting day, so the week starts from Monday, not Sunday.
3. Open this file:
wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.frontend.min.js
Since this is a minified file, you have to seach for the following line of code:
and change it to look like this:
The last step is to go to main settings of wpDataTables, under Custom JS and CSS tab, and disable the "Use minified wpDataTables Javascript" check-box.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello
Thanks a lot for this detailed answer.
It saves me some time :)
I guess I'll have to reproduce this after the next plugin update...
Unfortunately yes, Clément
You're welcome, though!
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I created a feature request.
For the ones who need this, you can upvote here:
https://features.wpdatatables.com/51
Thank you, Clément.
Hopefully, it will receive a lot of votes, so it's pushed on our To-Do list.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables