- Posts: 3
COMMUNITY FORUM
Change date format in date extrafield - MissionIMP
- chemicalbr
-
Topic Author
- Offline
- New Member
Less
More
12 years 8 months ago #103082
by chemicalbr
Change date format in date extrafield - MissionIMP was created by chemicalbr
:pinch:
Hi!
I have trying for 3 days to change the date format of date extra field here :
remontiram.com/
and here:
remontiram.com/offer-trip/item/10-%D0%BF%D1%8A%D1%82%D1%83%D0%B2%D0%B0%D0%BD%D0%B5-%D0%B4%D0%BE-%D0%BF%D0%BB%D0%B5%D0%B2%D0%B5%D0%BD
First is k2filtrify module second link is item view page.
I want dates in date extrafield in format YYYY MM DD ?
I have tried changing values in language files in bulgarian, language overrides but its not working ?
Maybe it is the calendar inputing the value in the backend ?
I didn't manage to change the format of calendar here
/administrator/components/com_k2/models/extrafield.php
"
$output = JHTML::_('calendar', $active, 'K2ExtraField_'.$extraField->id, 'K2ExtraField_'.$extraField->id);
"
Please help.
Hi!
I have trying for 3 days to change the date format of date extra field here :
remontiram.com/
and here:
remontiram.com/offer-trip/item/10-%D0%BF%D1%8A%D1%82%D1%83%D0%B2%D0%B0%D0%BD%D0%B5-%D0%B4%D0%BE-%D0%BF%D0%BB%D0%B5%D0%B2%D0%B5%D0%BD
First is k2filtrify module second link is item view page.
I want dates in date extrafield in format YYYY MM DD ?
I have tried changing values in language files in bulgarian, language overrides but its not working ?
Maybe it is the calendar inputing the value in the backend ?
I didn't manage to change the format of calendar here
/administrator/components/com_k2/models/extrafield.php
"
$output = JHTML::_('calendar', $active, 'K2ExtraField_'.$extraField->id, 'K2ExtraField_'.$extraField->id);
"
Please help.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
12 years 8 months ago #103083
by Lefteris
Replied by Lefteris on topic Re: Change date format in date extrafield - MissionIMP
Hi. Go to your language file and set the desired format by translating the "K2_DATE_FORMAT_LC" variable. Note that this will change the date format in other places too, where this variable is used.
Please Log in or Create an account to join the conversation.
- chemicalbr
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
12 years 8 months ago - 12 years 8 months ago #103084
by chemicalbr
Replied by chemicalbr on topic Re: Change date format in date extrafield - MissionIMP
Hi
I did that ,and noting happened!
I have changed :
K2_DATE_FORMAT_LC2="%Y %m %d" and
K2_DATE_FORMAT_LC="%Y %m %d"
and in the frontend it is still
Четвъртък, 20 Септември 2012
Again this is an extra field
I did that ,and noting happened!
I have changed :
K2_DATE_FORMAT_LC2="%Y %m %d" and
K2_DATE_FORMAT_LC="%Y %m %d"
and in the frontend it is still
Четвъртък, 20 Септември 2012
Again this is an extra field
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
12 years 8 months ago #103085
by Lefteris
Replied by Lefteris on topic Re: Change date format in date extrafield - MissionIMP
Did you changed the right file? The one for the current language and not the English one? Also if you are under Joomla! 2.5 the formatting should not include the percentage character. Take a look at the en-GB.com_k2.ini file and translate accordingly.
Please Log in or Create an account to join the conversation.
- Pelle Joens
-
- Offline
- New Member
Less
More
- Posts: 2
12 years 7 months ago #103086
by Pelle Joens
Replied by Pelle Joens on topic Re: Change date format in date extrafield - MissionIMP
Hi,
I had the same problem and changing the language-files did not solve it. But after a little research I found this "solution":
Add a language-override with the key: "K2_DATE_FORMAT_LC" and the text :"d. M Y". It works fine!
I had the same problem and changing the language-files did not solve it. But after a little research I found this "solution":
Add a language-override with the key: "K2_DATE_FORMAT_LC" and the text :"d. M Y". It works fine!
Please Log in or Create an account to join the conversation.
- Matt
-
- Offline
- Senior Member
Less
More
- Posts: 56
12 years 4 months ago #103087
by Matt
Replied by Matt on topic Re: Change date format in date extrafield - MissionIMP
Lefteris, it seems these keys are hardcoded:
K2_DATE_FORMAT_LC2="%A, %d %B %Y %H:%M"
K2_DATE_FORMAT_LC="%A, %d %B %Y"
Changing them in the ini files won't have any effect. In fact, you can delete them and nothing will change.
As Pelle Joens said, you can work around this by overriding keys in joomlas ACP but without the %.
If this bug has already been reported, forget it, if not, please fix it, thanks.
K2_DATE_FORMAT_LC2="%A, %d %B %Y %H:%M"
K2_DATE_FORMAT_LC="%A, %d %B %Y"
Changing them in the ini files won't have any effect. In fact, you can delete them and nothing will change.
As Pelle Joens said, you can work around this by overriding keys in joomlas ACP but without the %.
If this bug has already been reported, forget it, if not, please fix it, thanks.
Please Log in or Create an account to join the conversation.
- snlr
-
- Offline
- Junior Member
Less
More
- Posts: 20
12 years 3 months ago #103088
by snlr
Replied by snlr on topic Re: Change date format in date extrafield - MissionIMP
Hi,
could you explain how this works exactly "Add a language-override"?
If not in one of the language ini files where else is this added?
thank you
could you explain how this works exactly "Add a language-override"?
If not in one of the language ini files where else is this added?
thank you
Please Log in or Create an account to join the conversation.
- mikexcite
-
- Offline
- New Member
Less
More
- Posts: 4
12 years 3 months ago - 12 years 3 months ago #103089
by mikexcite
Replied by mikexcite on topic Re: Change date format in date extrafield - MissionIMP
Weirdly, K2 defines the date format in the ini files in administrator language files. Finally finding and changing those worked for me. Change en-GB.com_k2.j16.ini and you could be good to go.
I'm no expert so I can't tell you more than that except I beat my head against my keyboard for an hour last night wondering why changing the normal language files didn't do anything. K2 shouldn't have the entires in the normal language files if they don't do anything.
Credit and thanks to this guy.
Note, you can make new date formats here just as easily, get more customization and not accidentally break things elsewhere. I have K2_DATE_FORMAT_MONTH and K2_DATE_FORMAT_YEAR for when I need those.
Mike
I'm no expert so I can't tell you more than that except I beat my head against my keyboard for an hour last night wondering why changing the normal language files didn't do anything. K2 shouldn't have the entires in the normal language files if they don't do anything.
Credit and thanks to this guy.
Note, you can make new date formats here just as easily, get more customization and not accidentally break things elsewhere. I have K2_DATE_FORMAT_MONTH and K2_DATE_FORMAT_YEAR for when I need those.
Mike
Please Log in or Create an account to join the conversation.