Support

Account

Home Forums Add-ons Repeater Field Display Specific Repeater Field Row Based on Date Reply To: Display Specific Repeater Field Row Based on Date

  • Hi @inhouse

    I believe you can do it like this:

    $current_date = (int) date('j');
    $start = (int) get_sub_field('date_range_beginning');
    $end = (int) get_sub_field('date_range_ending');
    
    if ($current_date >= $start && $current_date <= $end){
        the_sub_field('contact_hour_days', 25);
    }

    Hope this helps.