unionco / calendarize

Calendar Field Type for CraftCMS
MIT License
18 stars 15 forks source link

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

Open tsawitzki opened 4 years ago

tsawitzki commented 4 years ago

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?