Support

Account

Home Forums Add-ons Repeater Field Date appears wrong on repeater field and data transfer Reply To: Date appears wrong on repeater field and data transfer

  • About your first question, when your “desde” field is empty, it will return the today date same way if i do this:

    $date = new DateTime();

    You should make a condition to test if $date is not empty, like:

    
    <?php $date = get_sub_field('desde', false, false); 
    if($date){
    $date = new DateTime($date);
    echo $date->format('d/m/Y'); 
    } ?>
    

    Second question…. not clear what you mean 🙂