Forums

Change language of datepicker in chronoformsV5

lackner_media 15 Oct, 2014
Answer
Hello,

I need your help with the datepicker in Chronoforms V5. We use this in a form on our site.
The whole site is in german. Now the customer whishes, that the datepicker calender is also in german (the days and months).

Where can I change this?

Hope you can help me.

Joachim
saber 24 Oct, 2014
Hi Greyhead
data-shortmonths=[".... works fine for me.
data-shortdays=["... does not show any effect in my form.
Is there anything wrong with thise code?

data-start_date=<?php echo date("Y-m-d"); ?>
data-shortdays=["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"]
data-shortmonths=["Jan", "Fev", "Mar", "Avr", "Mai", "Juin", "Juil", "Aout", "Sep", "Oct", "Nov", "Dez"]

Thanks a lot for your help!

http://hotelroterochsen.ch/fr/
Max_admin 25 Oct, 2014
Hi Saber,

Please try this instead:

data-shortdays=["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"]
data-shortmonths=["Jan", "Fev", "Mar", "Avr", "Mai", "Juin", "Juil", "Aout", "Sep", "Oct", "Nov", "Dez"]
data-start_date=<?php echo date("Y-m-d"); ?>


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 25 Oct, 2014
Hi Joachim,

There is one more change I had to work out to get this to work. The format you use for the minDate 'date' has to match the date Format set for the datepicker.

The default date format is d-m-Y so, in that case the code would be
data-shortdays=["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"]
data-shortmonths=["Jan", "Fev", "Mar", "Avr", "Mai", "Juin", "Juil", "Aout", "Sep", "Oct", "Nov", "Dez"]
data-start_date=<?php echo date("d-m-Y"); ?>
saber 27 Oct, 2014
Thank you very much Max and GreyHead - like this it works perfectly! 😀
HerKle 27 Nov, 2014
Hi there,
well it should be integrated into the faq manual that IF you want to change the language in the day's and month's fields, you MUST enter a startdate (in the consistent way of spelling the date as defined earlier in 'Basic' tab).

Additionally, it would be nice to have the help text in the form itself, where the days/months are shown in single quote marks, while here you show double quote marks – which seems to be the only way working – could be corrected.

And last but not least, it would be nicer to have the text which definetely has to be filled in could be separated from the text parts, which shouldn't. When reading the faq, it looks to me as if I had to fill in the entire string, eg.
'data-shortdays=["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]'
into the field "Days". That gives funny results in the calendar view.

Cheers,
Herbert
GreyHead 30 Nov, 2014
1 Likes
Hi Herbert,

I've added a note the FAQ about using the boxes on the Advanced tab - they have been added since the FAQ was written.

Bob
cafweb 14 Feb, 2015
Hi GreyHead,
I tried the FAQ and also the hints in this threat but I only can change the language of the month. The days (shortdays) don't change.
I`m running chronoforms5 (5.0.5, 07.February.2015) and tried to change the days in the advanced tab (["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]) and also in the 'extra params box' (data-shortdays=["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]). Also adding a startdate change anything.
After all I 'hacked' the days in the file 'gdatetimepicker.js'.

Changing the first day of the week from sunday to monday also didn't work fine. I supposed, that I only have to change the "data-shortdays_indexes=[0, 1, 2, 3, 4, 5, 6]" to "data-shortdays_indexes=[1, 2, 3, 4, 5, 6, 0]" but that also didn't take any efect.

Maybe I forgot something or didn't read carefully enough? Any sugestions?

Thx,
Frank
Max_admin 15 Feb, 2015
Hi Frank,

This is a bug, please wait for the new update scheduled for later today!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cafweb 20 Feb, 2015
:D Thx, now it works fine! 😀
cafweb 22 Feb, 2015
Hi together,
sorry for complaining but there is still a little bug in the new Version (5.0.6, 15.February.2015).

Changing the "data-short-days_indexes" to "data-shortdays_indexes=[1, 2, 3, 4, 5, 6, 0]" only takes effect at the names of the days but don't change the dates so that they are wrong (for example Monday, 01. February instead of Sonday, 01. February. I expected that after doing the change it would be Monday, 02. February; Tuesday, 03. February, etc.)

[attachment=0]datepicker.png[/attachment]

Regards,
Frank
Max_admin 22 Feb, 2015
Hi Frank,

Thanks for the report, bug found and fixed, a new update is expected later today!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cafweb 23 Feb, 2015
Wow, Mr. Payne, you are that fast.😀

I allready checked the new version - it works!
Many thanks for your help.
jfgiroux 31 Mar, 2015
How do you change the language of datepicker in a bilingual form in CF5 ? This was possible with the Mootools datepicker in CF4.
Thanks
J-F Giroux
Max_admin 31 Mar, 2015
1 Likes
You can use a locales string in the date picker short days setting and translate it under the "Locales" tab.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jfgiroux 01 Apr, 2015
1 Likes
This works nicely but the Instructions in the Advanced tab of the Datepicker Edit element settings should be modified for the Short Days and Short Months. It should mention that the elements must be in “ “ and not in ‘ ‘ and separated by , without space.
Thanks
Max_admin 02 Apr, 2015
Thanks for the hint, I will add that!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.