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:
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?
Hello, I am looping through occurencies like this, successfully retrieving the next occurence in my template as time (eg. 10:00 pm):
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 thestartDate
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 outputstardDate
andendDate
as flexible as it works withnext
?