Forum

Thread tagged as: Question, Events

Turn off past events with perch_events_custom

Hi

is there a way to turn off past events if you use perch_events_custom

I have tried 'past-events' => false, but this does not work

Or can you set the date field to greater than todays date.

Regards,

Brett

Brett Warne

Brett Warne 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can filter:

'filter' => 'eventDateTime',
'match' => 'gt',
'value' => date('Y-m-d H:i:s'),

Hi drew

I under stand I can filter on dates but it is not what I need. If I set the date to be greater than today by Friday I could have a past event showing up. What I need is like the php today variable so that the today date is always on the date of the day you are on. I know I can use event listing and modify the templates but I just wondered if there was an easier way.

Regards

Brett

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's what date('Y-m-d H:i:s') does - it's the current date and time.

Thanks drew, love what you have done with perch and runway.

Regards

Brett