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...
Issue fork calendar-1298404
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
jay-dee-ess CreditAttribution: jay-dee-ess commentedtr 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.
Comment #2
Brainwrap CreditAttribution: Brainwrap commentedHmmm...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.
Comment #3
jay-dee-ess CreditAttribution: jay-dee-ess commentedA 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:
Hope that helps.
Comment #4
Brainwrap CreditAttribution: Brainwrap commentedBINGO! That did it, thank you!!
Comment #5
grincon CreditAttribution: grincon commentedWorked for me, thanks!
Comment #6
johnnyfofo CreditAttribution: johnnyfofo commented#3 works great- Thanks jay-dee-ess!
Comment #7
Kolo CreditAttribution: Kolo commentedI 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?
Comment #8
asrs CreditAttribution: asrs commentedCan you tell me which CSS I need to edit? I need to hide weekends in the Calendar view. Thanks!
Comment #9
TryAgain y veras CreditAttribution: TryAgain y veras commentedThanks 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!
Comment #10
apadernoI am closing this issue, since it's for a Drupal version no longer supported.
Comment #11
manoloka CreditAttribution: manoloka commentedFor me #3 works for the month display but breaks the week display
so to affect only the month display I used this instead till I find a solution for week display
Update - just notice that only breaks the mini calendar view