FIX FOR: wrong date highlight in monthly calendar view

Home Forums Calendar Products Events Calendar PRO FIX FOR: wrong date highlight in monthly calendar view

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1001066
    Carmine Lucarelli
    Participant

    Hi all. I added a bit of javascript to fix the date highlighting error. I added it to the end of the monthly view template (copied to my theme directory) and thought I’d share it as a stopgap measure until the bug is squashed. It works, though I’m sure it could be improved:

    <script type="text/javascript">
    
      d = new Date();
      curday = d.getDate();
      if(('' + curday).length < 2)
        curday = "0" + curday;
      jQuery("td.tribe-events-present").removeClass("tribe-events-present");
      jQuery("td.tribe-event-day-" + curday).removeClass("tribe-events-past");
      jQuery("td.tribe-event-day-" + curday).addClass("tribe-events-present");
    
    </script>
    • This topic was modified 10 years, 8 months ago by Carmine Lucarelli.
    • This topic was modified 10 years, 8 months ago by Geoff.
    • This topic was modified 10 years, 8 months ago by Geoff.
    #1001383
    Geoff
    Member

    Rock on, thanksĀ Carmine! That looks like a solid solution to me and I appreciate you sharing it here with the community.

    I know we’re working on some refinements in 3.12 which ships soon, so please be sure to check that out when it’s available to see if that helps some of the lifting as well.

    Cheers and thanks again!

    Geoff

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘FIX FOR: wrong date highlight in monthly calendar view’ is closed to new replies.