Support » Plugin: Event post » The TODAY border is gone

  • Resolved Leslie Carson


    The border around today’s date in the calendar view is now gone. It was working just fine a few days ago. I even installed it on a fresh install of WordPress and it’s not there!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael


    Forum Moderator

    are you referring to the default calendar widget, or a calendar plugin?

    It was missing from both the Events calendar widget and the shortcode [events_cal]. However, I spent a lot of time today and fixed the problem. It had to do with the leading zero in the date. I assume the box would be back all on its own on the 10th!

    Here’s the code I added:
    Right after this:

            for ($semaine = 0; $semaine <= 5; $semaine++) {   // 6 semaines par mois
                for ($journee = 0; $journee <= 6; $journee++) { // 7 jours par semaine

    I added this:

    /* ***** Added so the days less than 10 (single digit days) would have a box around them ***** */
    	$myNoJour = $sqldate . '-' . $NoJour;
    	$myNoJour = str_replace("--", "-0", $myNoJour);
            $myNoJour = strtotime($myNoJour);
    	$myNoJour = date('Y-m-d',$myNoJour);

    And then I changed the line:
    if ($sqldate . '-' . $NoJour == $cejour) {

    if ($myNoJour == $cejour) { // changed the variable from $NoJour to $myNoJour

    I also fixed the problem with the timezone. This is hard coded to my timezone but that could be done in code as well.:

    //* ***** Added to fix timezone offset problem ***** */
    //* ***** Gets the current time for my timezone ***** */
    	$mycejour  = new DateTime($value);
    	$mycejour  ->setTimezone(new DateTimeZone('America/New_York'));
            $sqldate = date('Y-m');
            $cejour = $mycejour  ->format('Y-m-d');	// returns 2016-09-04 = is today's date w/leading zeros
    //        $cejour = date('Y-m-d');	// returns 2016-09-04 = is today's date w/leading zeros

    And while I was at it, I rearranged the year/month navigation above the calendar with this:

    	/* << */
                $ret.='<button data-date="' . date('Y-n', $prev_year) . '" tabindex="0" title="'.sprintf(__('Switch to %s', 'event-post'), date('Y', $prev_year)).'" class="eventpost_cal_bt">&nbsp;<<&nbsp;</button> ';
    	/* < */
                $ret.='<button data-date="' . date('Y-n', $prev_month) . '" title="'.sprintf(__('Switch to %s', 'event-post'), date_i18n('F Y', $prev_month)).'" class="eventpost_cal_bt">&nbsp;<&nbsp;</button>&nbsp;';
    	/* month */
                $ret.=$this->NomDuMois[$mois] . '/';
       	/* year */
    	/* > */
                $ret.='&nbsp;<button data-date="' . date('Y-n', $next_month) . '" title="'.sprintf(__('Switch to %s', 'event-post'), date_i18n('F Y', $next_month)).'" class="eventpost_cal_bt">&nbsp;>&nbsp;</button> ';
    	/* >> */
                $ret.='<button data-date="' . date('Y-n', $next_year) . '" title="'.sprintf(__('Switch to %s', 'event-post'), date('Y', $next_year)).'" class="eventpost_cal_bt">&nbsp;>>&nbsp;</button> ';

    Here’s the test site I’m working on: You can see the calendar widget there. Looks great!

    You have a great plugin!


    p.s. do you have any documentation for the options on the settings page (event-settings)?

    Plugin Author Bastien Ho



    Sorry, since the support forum update, I was’nt receiving notification anymore….

    This issue will be fixed in next release this week.

    Plugin Author Bastien Ho


    Done !
    it’s now solved in version 4.4

    thank you again for the feedback

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The TODAY border is gone’ is closed to new replies.