Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
chefnelone CreditAttribution: chefnelone commentedno one? please help
Comment #2
Liakoni CreditAttribution: Liakoni commentedI have the same question, can anyone help?
Comment #3
nemo_Anhoa CreditAttribution: nemo_Anhoa commentedSubscribe
Comment #4
KarenS CreditAttribution: KarenS commentedEdit 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.
Comment #6
sergiu.popa CreditAttribution: sergiu.popa commentedI'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:00,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);
Comment #7
HeathN CreditAttribution: HeathN commentedOk, 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.
Comment #8
Steel Rat CreditAttribution: Steel Rat commentedI 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!!
Comment #9
Steel Rat CreditAttribution: Steel Rat commentedIs this module still supported?
Comment #10
cirrus3d CreditAttribution: cirrus3d commentedSince limiting the hours produces several warnings, I'm leaving a JS solution here. For example to hide the hours before 8AM on Week view:
And for the day view:
Comment #11
apadernoComment #12
manoloka CreditAttribution: manoloka commentedHi 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