I have searched but hard to find given the terms I can use - but am sure it has been raised and explained elsewhere so sorry for asking for a repeat.

But is there a setting in the arguments or somewhere else that will make the week and/or day view show all hours, not just those that have an event in them - if not perhaps it needs an approach as per the 'week count' you show on the month view, so the 'hours' get shown in an extra column on right??

Maybe??

CommentFileSizeAuthor
#6 501764.calendar.show-empty-times.patch2.07 KBjoachim
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JayKayAu’s picture

Hi all,

I have the same issue. Can anyone point us to a solution?

Thanks in advance :)

JayKayAu’s picture

I've been digging through PHP, and it seems to be /modules/calendar/theme/calendar-week.tpl.php which is the relevant file. If my very basic understanding of PHP is correct, there's a foreach loop (line 60) which is spitting out each of the events grouped by hour.

I guess better behaviour would be to have it spit out every hour (from some starting time, specified somewhere (e.g., 07:00), to some similarly specified finishing time), throwing in the events where necessary. I have even less idea where the start/end times should be specified (in the View editor?). Perhaps an overflow:scroll would be suitable here as well.

On further thought, if an event spans several hours (e.g, 9:30am to 11:30am), it should be placed in the calendar on top of the underlying grid of hours, rather than *inside* the table cells. This might involve some CSS floats or whatever. Alongside that is the problem of concurrent or overlapping events. These are dealt with (in iCal at least) by narrowing each of the concurrent events within the day's column.

Another issue would be showing events that cross day boundaries (e.g., 9pm to 6am).

toolman18’s picture

To get all of the hours (from 7am till 9pm) to display was on the "Day view", click the gear icon next to "Style: Calendar" under "Basic Settings". Then, for "Time Grouping" specify "Custom" and put
07:00:00,08:00:00,09:00:00,10:00:00,11:00:00,12:00:00,13:00:00,14:00:00,15:00:00,16:00:00,17:00:00,18:00:00,19:00:00,20:00:00,21:00:00
into the text box.

toolman18’s picture

Status: Active » Fixed

The above answers the question.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joachim’s picture

Title: How to make 'empty' hours show in day or week view » add option to show 'empty' hours in day or week view
Category: support » feature
Status: Closed (fixed) » Needs review
FileSize
2.07 KB

There's actually a TODO in the code about this:

    // TODO make this an option setting.
    $view->date_info->style_show_empty_times = $this->options['groupby_times_show_empty_times'];

Here is a patch to do that :)
I've left the form element description for someone else to write as I'm not sure how best to put it.

NickDickinsonWilde’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

6.x is entirely unmaintained.