Hide item on repeater base on certain date

Hi Everyone

has anyone ever tried to hide data based on date, I want to hide data item based on data on “voucher end”. please help me if anyone ever tried.

thank you

Already have tried to do the following SEARCH?
You get more than 5-pages of RESULTS. I can’t believe that all the found content can’t help you to figure out, how to do it!?

Your problem can be devided into 2 parts.

  1. How to hide/show items in repeater?
  2. How to work with dates?

When working with repeater, the following code-part will be mandatory…

   $w('#repeater1').onItemReady(($item, itemData, index)=>{
      //everything whats here inside, belongs to REPEATER
      //That means --> if you want to control an element INSIDE-REPEATER
         $item('#myINSIDErepeaterBUTTON1').label = "Clicked-Button";
      //If you want to controll all of the repeater BUTTONS with the same ID...
         $w('#myINSIDErepeaterBUTTON2').label = "Clicked-Button";

To test this, place a repeater onto your page.
Add two buttons inside repeater (button1 + button2).
Add the shown code to your page.
Rename all related element-IDs → “repeater1” / “button1” / “button2” and so on.

Test the code and also do not forget to take a look into console.

Almost forgot to mention! Before you can use this code-example, you will have first to populate your repeater with data.

$w('#repeater1').data = DATA;    //"your DATA here"


let DATA = [
    "_id": "1",
    "firstName": "John",
    "lastName": "Doe",
    "image": "http://someImageUrl/john.jpg"
    "_id": "2",
    "firstName": "Jane",
    "lastName": "Doe",
    "image": "http://someImageUrl/jane.jpg"

In most cases the DATA is generate out of a DATABASE-QUERY.

let DATA = get_DATA("DATABASE_ID_here", "DATAFIELD_ID_here", "VALUE_here");
    return wixData.query(DATABASE)
        let ITEMS = res.items; 
    .catch((err)=>{console.log("ERROR: ", err);});

BTW: HIDE/SHOW an element:


Put now all the new knowledge together and generate a working CODE.

And of course you may need an if-else-statement…like…

if(comparisson here) {...}
else {...}
let x = 10
let y = 10

if(x===y) {console.log("Statement is true, continue code!");} 
else {console.log("Wrong RESULT! ERROR!");}

Good luck!

Some additional infos, working with DATE and TIME…