Expiring Repeaters With Dates That Have Passed

Can a repeater “Expire” a record display?
As in this scenario, I am sorting the repeater display by calendar date. Once the date passes, there a way to set the repeater so that the date that has passed, is no longer included in the repeater display layout?

So that the repeater is always showing the next date to come, and not showing dates from the past.

Any Idea if ‘expirations’ can be set on the display of a collection record?


The following screen shot is an example of one way to approach it. The idea with the date setting code is to make sure anytime after midnight is covered for the current date. Obviously, change the date field from “dateRegistered” to whatever your date field name is, and the dataset that your repeater is connected to, likewise. For some documentation on the filter function, read this: wix-data - Velo API Reference - Wix.com

Thank you!!! Greatly appreciated.

I attempted your suggestions but not seeing it working. Do you by chance recognize any errors in my script below?:

$w.onReady(() => {
$w(‘#dynamicDataset’).onReady( () => {
let today = new Date();


One thing that caught my eye was the name of the field in the ge (greater than or equal to) portion of the filter code, I’m thinking that you are referencing an element on the page. What you need there is the actual field key from the collection, and it is case-sensitive. In this example, the field key is “dateRegistered”.

Hey! Did this work? I’m trying the exact same thing.

Thank you very much for your suggestion anthonyb. This works well on my website except that it prevents items with today’s date being shown in the repeater. I think this is because my items have the date in one field, called “date” and the time in two other fields, called “startTime” and “endTime”. The time in the “date” field is always set to 12:00 AM automatically when users enter the date e.g. the date will show in the “date” field as “Mar 11, 2020, 12:00 AM”. I am trying to find a solution and would be grateful for any suggestions. Thanks, Dave.

Please follow our forum guidelines and add a new post rather than jumping onto a post from Feb 2019.

Have a look at this previous forum post as it may help you with this.

This is now being closed and if you would like more help then please post it up as a new post.