× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

Change format of Calendar (J_Calendar)

10 年 1 个月 前 #445 Russell English
Change format of Calendar (J_Calendar) was created by Russell English
Is there anyway to change the format of the date that is created when selecting a date from the J_Calendar?

It appears to be in  DATE_FORMAT_LC4 , but I can't find this to create a content override

Please 登录注册一个帐号 to join the conversation.

10 年 1 个月 前 - 10 年 1 个月 前 #447 Andres Maeso
Replied by Andres Maeso on topic Change format of Calendar (J_Calendar)
Hi Russell!

Long time no see. Hope this helps, it's Joomla Calendar Field standard behaviour: docs.joomla.org/Calendar_form_field_type

Andrés Maeso
Customer relations manager at Joomla Component Creator.

该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。
Last edit: 10 年 1 个月 前 by Andres Maeso.

Please 登录注册一个帐号 to join the conversation.

10 年 1 个月 前 - 10 年 1 个月 前 #448 Russell English
Replied by Russell English on topic Change format of Calendar (J_Calendar)
Thanks Andres, just found the XML file I need to edit.
Last edit: 10 年 1 个月 前 by Russell English.

Please 登录注册一个帐号 to join the conversation.

10 年 1 周 前 #480 Russell English
Replied by Russell English on topic Change format of Calendar (J_Calendar)
I've tried editing the XML file, but it's not working correctly. Also, accourding to your wiki here www.component-creator.com/wiki/index.php...ndar_(Date_Selector) there should be a format option within the field editor in Component Creator, but there doesn't appear to be.

Any ideas please?

Please 登录注册一个帐号 to join the conversation.

10 年 1 周 前 #482 Andres Maeso
Replied by Andres Maeso on topic Change format of Calendar (J_Calendar)
Hi Russel

For Joomla to be multilingual it has to store the date in a string called date_format_*, for that to be used it has to be converted from language file to string using JText class. Joomla calendar Field doesn't do that. To achieve that you would need to do your own calendar field (based on the joomla one) and convert that language string into the desired format.

Hope it helps

Andrés Maeso
Customer relations manager at Joomla Component Creator.

该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。

Please 登录注册一个帐号 to join the conversation.

10 年 3 天 前 #495 Russell English
Replied by Russell English on topic Change format of Calendar (J_Calendar)
Thanks Andres, I've tried to change the date format (in the XML) to ="%d-%m-%Y" from here docs.joomla.org/Calendar_form_field_type but for some reason, whenever the date is entered (using the component created by component-creator) and then saved, the date is saved as 000-00-00

I've tried this on several components as outputted by component-creator and they all give the same result.

Any ideas?

Please 登录注册一个帐号 to join the conversation.

创建页面时间:0.058秒
核心: Kunena 论坛

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.