determine if day has event

Home Forums Calendar Products Events Calendar PRO determine if day has event

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #71414
    Chad
    Participant

    How do i determine if a particular date has event? I used this code before, but it does not work after update.

    function isEventDay($isdate){

    $isdate2 = date(‘j M Y’, strtotime($isdate));
    $eventArgs=array(‘EventStartDate’=>$isdate2,’EventEndDate’=>$isdate2,’posts_per_page’=>’1’);
    $events=tribe_get_events($eventArgs);
    echo ““;
    if($events!=NULL){
    return true;
    }else return false;
    }

    #71542
    Barry
    Member

    Hi Chad,

    Can you try changing EventStartDate to start_date, EventEndDate to end_date, your date formats from j M Y to Y-m-d (also try setting the end date so it is one day ahead of the target date) and finally set an eventDisplay parameter of custom then see if that helps?

    Thanks!

    #71570
    Chad
    Participant

    Thanks man! That worked. Thanks for the assistance & keep up the killer work!

    #71578
    Barry
    Member

    Great to hear – and happy to help! 🙂

    #981469
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘determine if day has event’ is closed to new replies.