Hi,

In day display it shows 01.00 to 23.00 in the hour column. How do I set it to be: 08.00 to 18.00?

thanks

Comments

chefnelone’s picture

no one? please help

Liakoni’s picture

I have the same question, can anyone help?

nemo_Anhoa’s picture

Subscribe

KarenS’s picture

Status: Active » Fixed

Edit the day style settings. There is an option for the time grouping. Choose the option to create a custom grouping and put something like the following in it to manually create the time buckets you want to use:

00: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

Don't use this with overlapping display, it won't work right. Use it with the non-overlapping display.

Status: Fixed » Closed (fixed)

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

sergiu.popa’s picture

Status: Closed (fixed) » Active

I'm using this option for grouping, without overlapping: 09:00:00,10:00:00,11:00:00,12:00:00,13:00:00,14:00:00,15:00:00,16:00:0‌0,17:00:00,18:00:00,19:00:00,20:00:00

Hour 16:00:00 doesn't appear and I'm getting an error:
warning: date_format() expects parameter 1 to be DateTime, boolean given in \drupal6_calendar\sites\all\modules\calendar\calendar_multiday\theme\theme.inc on line 790.

The line #790:
$hour = date_format($date, $format_hour);

HeathN’s picture

Category: support » bug

Ok, here is a bug. When you have a space after the comma in the list, it breaks everything. so '00:00:00, 05:00:00' would not work but '00:00:00,05:00:00' does.

Steel Rat’s picture

Issue summary: View changes

I realize this is an old issue, but the custom hours entry just isn't a good solution.

The reason why the custom hours option doesn't work is because the display is too vague. As an example, I wanted 15 minute grouping, so I entered 00:00:00,08:00:00,08:15:00...17:45:00,18:00:00 to limit the work day to 8am to 6pm. But in the day view, the hours were shown as:

8AM
8AM
8AM
8AM
9AM
9AM
9AM
...

Hopefully you can see why that isn't desirable.

I think a better solution would be to allow a "work hours" setting that works in conjunction with the time grouping. So the admin can just set a start of day time, like 8am, and an end of day time, like 6pm, and the grouping will take over from there.

If a new issue is preferred, please let me know and I will post this as such.

Thanks!!

Steel Rat’s picture

Is this module still supported?

cirrus3d’s picture

Since limiting the hours produces several warnings, I'm leaving a JS solution here. For example to hide the hours before 8AM on Week view:

$("#single-day-container tr:not(.holder) td").each(function() {
  $(this).find('> div:lt(8)').hide();
});

And for the day view:

$("#single-day-container").find('.calendar-agenda-hour:lt(8)').hide();
$("#single-day-container").find('.calendar-agenda-items:lt(8)').hide();
apaderno’s picture

Version: 7.x-3.0-alpha1 » 7.x-3.x-dev
Issue tags: +Needs issue summary update
manoloka’s picture

Hi Cirrus3d and thanks for the JS,

Could you explain how do you apply the JS to the calendar template?

Could I use it in a day view to hide more blocks of yours? so it only displays the working hours

i.e
1 - hide the hours before 8
2 - hide the hours between 13 to 16
3 - hide the hours after 20

Thanks