- Posts: 27
- Thank you received: 0
Change Date Format
- Nico
-
Topic Author
- Offline
- Junior Member
-
Less
More
10 years 8 months ago #48570
by Nico
Change Date Format was created by Nico
I need to change DATE FORMAT in OS registration form.
At the moment users add their birth date in this format: AAAA--MM-DD,
I need to change format in DD-MM-AAAA
In OS configuration page I have change "Date Format" option with "d-m-Y", but it doesn't work!
How can I change it?
At the moment users add their birth date in this format: AAAA--MM-DD,
I need to change format in DD-MM-AAAA
In OS configuration page I have change "Date Format" option with "d-m-Y", but it doesn't work!
How can I change it?
- ferrick
- Offline
- New Member
-
Less
More
- Posts: 18
- Thank you received: 1
10 years 7 months ago #48585
by ferrick
Replied by ferrick on topic Change Date Format
Hi Nico,
U can go to this folder /components/com_osmembership/libraries/rad/form/field -> date.php change the format.
From
return JHtml::_('calendar', $this->value, $this->name, $this->name, '%Y-%m-%d',".$attributes.");
To
return JHtml::_('calendar', $this->value, $this->name, $this->name, '%d-%m-%Y',".$attributes.");
Thanks.
Regards,
Ferrick Chan
U can go to this folder /components/com_osmembership/libraries/rad/form/field -> date.php change the format.
From
return JHtml::_('calendar', $this->value, $this->name, $this->name, '%Y-%m-%d',".$attributes.");
To
return JHtml::_('calendar', $this->value, $this->name, $this->name, '%d-%m-%Y',".$attributes.");
Thanks.
Regards,
Ferrick Chan
The following user(s) said Thank You: Nico
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 7 months ago #48591
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change Date Format
Many thanks Ferrick for helping me answer this support question
.
Tuan

Tuan
Please Log in or Create an account to join the conversation.
- mikek
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
10 years 5 months ago #51907
by mikek
Replied by mikek on topic Change Date Format
IMPORTANT !!
If you use the fix above, and replace '%Y-%m-%d' with '%m-%d-%Y', you will get an error in the backend when trying to edit a registrant who has registered for an event.
You'll see this error:
An error has occurred.
0 DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed to parse time string (11-29-2014) at position 0 (1): Unexpected character
The error is because Mysql doesn't recognize (ex. 10-31-2014) this as a valid date type. You have to add slashes /, not hyphens.
SOLUTION:
*notice the new format is like 10/31/2014 (not 10-31-2014)
Hope this helps someone.
Mike
If you use the fix above, and replace '%Y-%m-%d' with '%m-%d-%Y', you will get an error in the backend when trying to edit a registrant who has registered for an event.
You'll see this error:
An error has occurred.
0 DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed to parse time string (11-29-2014) at position 0 (1): Unexpected character
The error is because Mysql doesn't recognize (ex. 10-31-2014) this as a valid date type. You have to add slashes /, not hyphens.
SOLUTION:
Code:
Use this format: '%m/%d/%Y'
Hope this helps someone.
Mike
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 5 months ago #51916
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change Date Format
Thanks Mike. Infact, it is PHP could not recognize the format and throw the error. I will try to think more about it and try to find a permanent solution and add support for it in the core of the extension
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.