<p>I think the simplest solution would be to make the <code>eventEndDate</code> field required even for single day events. Then you could do something like this:</p>

<pre><code>{% for event in craft.entries({
  section:'events', 
  eventEndDate:'&gt;= '~now,
  limit: 3, 
  order:'startDate'
}) %}
</code></pre>

<p>Given you have 3 events:</p>

<ol>
<li>Starts Monday, ends Friday.</li>
<li>Starts Wednesday, ends Thursday.</li>
<li>Starts Thursday, ends Thursday.</li>
</ol>

<p>On Wednesday, you'll still see those events in order (1,2,3).</p>

CC BY-SA 3.0
2017-04-06T00:26:23.390Z
2017-04-06T00:34:57.120Z
2017-04-06T00:34:57.120Z
Alex Roper
<p>I have an event section with custom fields for eventDate and eventEndDate.</p>

<p>I'm listing upcoming events in my template using:</p>

<pre><code>{% for event in craft.entries.section('events').eventDate('&gt;='~now).limit(3).order('eventDate ASC') %}
</code></pre>

<p>This works fine for single day events. But multi-day events disappear after the first day, when I want them to be listed until the event is over. I can't do .eventEndDate('>='~now) because the Event End Date field is left blank for single day events. Is there a way to add an OR to my query to get events with future eventDates OR events with future eventEndDates?</p>

<templating><datetime><forloop><custom-field>
Get future multi-day event entries with custom date field
# Get future multi-day event entries with custom date field

(Asked by: username_0 on 2017-04-05)

I have an event section with custom fields for eventDate and eventEndDate.
I'm listing upcoming events in my template using:
{% for event in craft.entries.section('events').eventDate('>='~now).limit(3).order('eventDate ASC') %}

This works fine for single day events. But multi-day events disappear after the first day, when I want them to be listed until the event is over. I can't do .eventEndDate('>='~now) because the Event End Date field is left blank for single day events. Is there a way to add an OR to my query to get events with future eventDates OR events with future eventEndDates?

**Tags:** templating, datetime, forloop, custom-field

---

## 1 answers

### Answer by username_1 on 2017-04-06. Score: 3

I think the simplest solution would be to make the eventEndDate field required even for single day events. Then you could do something like this:
{% for event in craft.entries({
  section:'events', 
  eventEndDate:'>= '~now,
  limit: 3, 
  order:'startDate'
}) %}

Given you have 3 events:

Starts Monday, ends Friday.
Starts Wednesday, ends Thursday.
Starts Thursday, ends Thursday.

On Wednesday, you'll still see those events in order (1,2,3).


---

