Displaying button using an IF statement

I have repeater that is connected to a database. If the repeater datefield matches the current date, then I want to change that container box’s color and display a button in that container. I used the following code but unable to see any change:

$w.onReady(function () {
 if ($w('#text77').text === Date()) {
        $w('#box14').style.foregroundColor = "#D4D4D2"
        $w('#button6').show()
    }
});

You need to use onItemReady or forEachItem or the repeated scope for repeater
like this →

#repeater1 - repeater
#text77 - text in the repeater which shows the date
#button6 - the button in the repeater
#box14 - the box

$w("#repeater1").onItemReady(($item, itemData, index)=>{
 if($item('#text77').text === Date()) {
 $item('#box14').style.foregroundColor = "#D4D4D2";
 $item('#button6').show();
 }
 else {
     $item('#box14').style.foregroundColor = "#FF0000";
     $item('#button6').hide();
   }
});

Hi Ajit:
Excuse my delay. Thanks for your prompt respsonse. I tried the code, but it didn’t work. No error was displayed. I also tried using the following as well, but didn’t work either. What would you suggest? Thanks again for taking the time, but do please give it another shot and let me know.

$w('#dataset1').onReady( () =>{
  $w('#repeater1').forEachItem  (($item, itemData, index)=>{
     if($item('#text77').text === Date()) {  
     $item('#box14').style.backgroundColor = "#803A42";
     $item('#button6').show();
     }
     else {
     $item('#box14').style.backgroundColor = "#FF0000";
     $item('#button6').hide();
     }
   });
  });