Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date field format not applied when output includes traversal #5070

Closed
quasel opened this issue Jul 16, 2018 · 2 comments
Closed

Date field format not applied when output includes traversal #5070

quasel opened this issue Jul 16, 2018 · 2 comments

Comments

@quasel
Copy link
Member

quasel commented Jul 16, 2018

Reported in #beaver-themer
I tested with [pods name="homepage" field="current_event.date'"] and [pods field="date"] on a events single page. The second shortcode displays the correct format (12.07.2018), the first one (using the relationship from the settings page) displays the wrong format (2018-07-12).

Workaround:
I managed a work-around: [pods name="homepage" template="current-event-date"] with a template "current-event-date" of {@current_event.date, tv_formatdate} and a function "tv_formatdate" of:

function tv_formatdate($input_date) {
     return date("d.m.Y", strtotime($input_date));         
};
@quasel quasel added Type: Enhancement Enhancements to features that already exist, but are not major additions and removed Type: Enhancement Enhancements to features that already exist, but are not major additions labels Aug 31, 2018
@quasel
Copy link
Member Author

quasel commented Aug 31, 2018

@pglewis Bug or Feature ;)

@quasel
Copy link
Member Author

quasel commented Aug 31, 2018

just found out sort of Duplicate of #4932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant