I try to place a translated datepicker into a form. Functionality is fine but I am unable to translate the one letter labels of the weekdays. Can you please help me with this?
Hello again,
Here is my datepicker config:
$('.datepicker').pickadate({
monthsFull: ['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'],
weekdaysShort: ['S','M','D','M','D','F','S'],
weekdaysFull: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
format: 'dddd, dd. mmmm yyyy',
formatSubmit: 'dd.mm.yyyy',
today: 'Heute',
clear: 'cancel',
close: 'OK',
firstDay: 1
});
It's working correct in my project. Here You have the screenshot:
https://ibb.co/cc6fmc
I recommend to update MDB to the latest version.
Regards
Hi Mikolaj,
I am confused too :)
The first picture shows the problem, the labels of the weekdays are in English. I need them in German. Instead of [M,T,W,T,F,S,S] i need [M,D,M,D,F,S,S].
I modified the code as follows:
$('.datepicker').pickadate({
monthsFull: ['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'],
weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ],
weekdaysShort: [ 'S', 'M', 'D', 'M', 'D', 'F', 'S' ],
format: 'ddd, dd. mmmm yyyy',
formatSubmit: 'dd.mm.yyyy',
today: 'Heute',
clear: '<i class="material-icons">cancel</i>',
close: 'OK',
firstDay: 1
});
In the second picture (attached below) you can see in the form on the back, that the short weekdays are perfectly fine. Just not the one letters on the datepicker itself. Please help.
https://ibb.co/hLCEPx
Regards
Peter
Hi,
I am confused. What is the problem with short weekdays? In Your example translation is working correctly. You should only move the last value to the firts position.
Regards
Hi Mikolaj,
thank you for the quick reply. Unfortunately this is not the solution for the problem for me. Here is my code:
$('.datepicker').pickadate({
monthsFull: ['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'],
weekdaysShort: ['M','D','M','D','F','S','S'],
weekdaysFull: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
format: 'dddd, dd. mmmm yyyy',
formatSubmit: 'dd.mm.yyyy',
today: 'Heute',
clear: '<i class="material-icons">cancel</i>',
close: 'OK',
firstDay: 1
});
Thank you for your help
Peter