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

startDate/endDate throws "unknown property" inside for-loop #50

Open
tsawitzki opened this issue Jun 4, 2020 · 0 comments
Open

startDate/endDate throws "unknown property" inside for-loop #50

tsawitzki opened this issue Jun 4, 2020 · 0 comments

Comments

@tsawitzki
Copy link

Hello, I am looping through occurencies like this, successfully retrieving the next occurence in my template as time (eg. 10:00 pm):

{% for occurrence in occurrences %}
  {{ occurrence.next.format('h:i a') }}
{% endfor %}

However, now that I want to have the ending time displayed to ("10:00 pm – 11:00 pm"), using {{ occurence.endDate|date('Y-m-d') }} throws a templating error, same with using the startDate query:

Getting unknown property: craft\elements\Entry::endDate

What am I doing wrong?
I assume that being inside that for loop, I should be able to flexible output stardDate and endDate as flexible as it works with next?

@tsawitzki tsawitzki changed the title startDate/endDate not accepted startDate/endDate throws "unknown property" inside for-loop Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant