By Mel on Saturday, 03 October 2015
Replies 5
Likes 0
Views 837
Votes 0
Hi,

where do I set the date format for custom fields in EasyBlog? Currently the are in US format (I need uk). I have tried changing the language files but these are not having any effect (and look to be in the correct order anyway with Do MMM YYYY.

Are custom field dates set somewhere else.

Mel
Hey Mel,

I am really sorry for the delay of this reply as it is a weekend for us here. You need to be specific as to which field are you referring to here so that I can review the field and provide you with an answer.
·
Sunday, 04 October 2015 02:37
·
0 Likes
·
0 Votes
·
0 Comments
·
My apologies Mark (tired)

I meant the custom field of type Date in Easyblog 5x.

It is showing in US dat format and I need to make it UK format.

Mel
Mel
·
Sunday, 04 October 2015 03:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mel,

I am really sorry for the delay of this reply as it is a weekend for us here. Currently there is no formatting for the dates output as it just displays what is stored in the database. If you want, you can modify the file /administrator/components/com_easyblog/themes/default/fields/types/display/date.php and locate the codes below at line 15,


<i class="fa fa-calendar"></i> <?php echo $data->value;?>


Replace it with,


<i class="fa fa-calendar"></i> <?php echo JFactory::getDate($data->value)->format(JText::_('DATE_FORMAT_LC'));?>


This will use the locale that is defined in your language file.
·
Sunday, 04 October 2015 16:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

thanks so much. That works!

I suppose would need to change this each time I upgrade?

Kind regards

Mel
Mel
·
Monday, 05 October 2015 17:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mel,

You are welcome. Yes you need to keep this change as backup since we do not include this in our repository.
·
Monday, 05 October 2015 17:33
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post