amr ical events lists
[resolved] What is the best way to hide weekends? (3 posts)

  1. John Carman
    Posted 2 years ago #

    In other words, what is the best way to display a five-day work week? I have identified at least two ways to do this using CSS or a combination of JS (to deal with colspan) and CSS, but I would prefer not to use a hack.


  2. anmari
    Plugin Author

    Posted 2 years ago #


    hiding with css is probably the safest (I'm not a fan of js solutions). There are currently no settings to stop weekends being generated

    (what would one do if an event was on a weekend ??)

  3. John Carman
    Posted 2 years ago #

    On a public school cafeteria calendar, there are no weekend events, so I can safely hide weekends.

    CSS alone does not work, because if you hide the weekend columns, the colspan is wrong on the td.pad cells.

    I actually went with a pure jQuery solution. This way, it will degrade gracefully for users with JS disabled:

      $('table.largecalendar td.day6, table.largecalendar td.day7, table.largecalendar th.saturday, table.largecalendar th.sunday').hide();
      var colspans = $('table.largecalendar td.pad').attr('colSpan');
      if (colspans>1) $('table.largecalendar td.pad').attr('colSpan', parseInt(colspans)-1);

    Thanks for the prompt response! I love the plugin. I also wanted to build a customized event listing, and I was able to do that easily by configuring a list type.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • amr ical events lists
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic