Hi, I'm in the process of converting a client over from using an older, Perl-based calendar program called, simply enough, CalendarScript. While outdated, it does have some nice features, one of which is the ability to only display weekdays (Monday - Friday) in both the Month and Week views.

I can't figure out how to accomplish this using Drupal Calendar. I'm assuming it has something to do with customizing the CSS, but can't figure it out.

Any suggestions appreciated...

Comments

jay-dee-ess’s picture

tr th:first-child, tr td.date-box:first-child, tr td.single-day:first-child { display:none; }
tr th:last-child, tr td.date-box:last-child, tr td.single-day:last-child { display:none; }

See correction below.

Brainwrap’s picture

Hmmm...appreciate it, but that didn't do the trick; that moved the display from Tuesday - Saturday (instead of Monday - Friday), and still displayed the last 2 columns, just not their headers.

jay-dee-ess’s picture

A couple of things that may help:
- Is your first day of the week in "admin/settings/date-time" set to Sunday? That may fix the Tuesday thing
- I made a couple of updates since I posted:

.calendar-calendar tr th:first-child, .calendar-calendar tr td.date-box:first-child, .calendar-calendar tr td.single-day:first-child { display:none; }
.calendar-calendar tr th:last-child, .calendar-calendar tr td.date-box:last-child, .calendar-calendar tr td.single-day:last-child { display:none; }

Hope that helps.

Brainwrap’s picture

BINGO! That did it, thank you!!

grincon’s picture

Worked for me, thanks!

johnnyfofo’s picture

#3 works great- Thanks jay-dee-ess!

Kolo’s picture

I have a problem. This solution works in Drupal 7 but only in Month view and only if I change my first day of week to Sunday.
It also breaks Week view...

I still want to disable/hide Saturday and Sunday but without destroying views and changing first day to Sunday.
Can you help?

asrs’s picture

Issue summary:View changes

Can you tell me which CSS I need to edit? I need to hide weekends in the Calendar view. Thanks!

TryAgain y veras’s picture

Thanks for your informations guys!
Code in #3 worked for me (pasting it in my rewritestyle.css) after changing first day to Sunday in "Configuration-- Regional and language--Regionall settings". I didn´t need the tabs in top for week and day so i removed it in the calendar view going to WEEK tab--Menu-- Select: No menu entry

I needed a page showing the calendar but notice that when you apply code in #3 and want to show a block it shows without Sat and Sun labels...

As far as i didn´t need a block it was ok for me!