When you edit a week or day view's Format > Settings, you can change Time Grouping to 'half hour'. After you've done that, however, all items with a from-to date on the calendar still show as if the calendar were grouped by hour.
Attached image will show you what I mean.
To "fix" the display in the screen shot, I had to edit this piece of html:
Old, broken version
<div class="item d_4 o_1 i_0 md_0 first_item">
New, working version
<div class="item d_8 o_2 i_0 md_0 first_item">
As you can see, the display is indeed taking the 'half hour' Time Grouping into account, but the CSS class integers applied to the actual calendar items aren't multiplied to reflect this change. They still show as if the calendar were grouped by hour.
Suggested fix: do some calculations based on Time Grouping before applying classes to style calendar items. Additionally, having at least support for quarter hours would be great in case it's too difficult to support custom Time Grouping like this.
Comment | File | Size | Author |
---|---|---|---|
#2 | week-day-view-half-hour-grouping-fix-1305938-1.patch | 2.42 KB | kristiaanvandeneynde |
#1 | week-day-view-half-hour-grouping-fix-1305938-1.patch | 128 bytes | kristiaanvandeneynde |
drupal-calendar-issue.png | 12.26 KB | kristiaanvandeneynde |
Comments
Comment #1
kristiaanvandeneyndeAdded a patch which solves this for both week and day views when time grouping is set to 'half hour'.
However: There is no fix for custom time groupings, they still indent calendar events as if they were grouped by hour.
Comment #2
kristiaanvandeneyndeAttached wrong patch, correct one attached
Comment #3
KarenS CreditAttribution: KarenS commentedI used your patch as a starting point and made some additional changes. I also added in validation to prevent someone from trying to combine custom time grouping with the overlapping style, since there is no way I can see to make that work.
http://drupalcode.org/project/calendar.git/commit/c91e0a6
Comment #5
dhalbert CreditAttribution: dhalbert commentedReopening. This patch causes bug #1398584: calendar-date/week generates errors: Undefined index: groupby_times in template_preprocess_calendar_week(), see #8 there.
Comment #6
dhalbert CreditAttribution: dhalbert commentedClosing again. Problem was an uninitialized value in the prototype view for Calendar. See #13 in #1398584.