Closed (outdated)
Project:
Calendar
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2011 at 16:14 UTC
Updated:
5 Nov 2025 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
merilainen commentedHmm, I don't see this in month view, but instead in day and week views.
I posted a patch to #1269470: All events are shown twice because I had duplicate results, I think the other item was always multiday because of the incorrect date calculations. You can try that patch if it helps.
But as I said, I experience this issue in week and day views.
Comment #2
jackalope commentedHmm... I'm still seeing the same behavior in the Calendar month and week views, but NOT in the day view. Strange! I'm using the most recent 7.x-3.x-dev version. I tried your patch just in case, mErilainen, even though it seems unrelated, but it has no effect. Thanks anyhow!
Comment #3
merilainen commentedHave you tried in Views to change the time grouping setting which both the day and the week display offer? Changing that to "hour" might change the events from multi-day to single ones.
Comment #4
nemo_Anhoa commentedIs there any other method than change settings for this one ?
I got the css class turn into multi-day also.
Comment #5
afsolano commentedsubscribing -- same issue
Comment #6
davident commentedsubscribing -- same issue
My temp fix was to use some jQuery to remove the 'multi-day' class from the td.
Comment #7
thinkdrupal commentedI have a node with an end date and I have this issue. Any event on the last day of the month will show as multiday on the first day of the next month.
Comment #8
pbfleetwood commentedI have the same problem on both month and week displays.
Comment #9
pbfleetwood commentedIt's been four months since this issue was opened. Has anyone come up with a workaround?
I've tried to get around it by making the single day and multi-day events look the same via css, but this is rather complicated and one doesn't want to mess up the display of true multi-day events.
I'm bumping the priority.
Comment #10
Morn commentedSetting Mutlti-day style (in the Month Options) as
"Display multi-day item as a single column"
is an easy workaround.
Comment #11
pbfleetwood commentedThank you, @Morn. What you suggest in #10 helps somewhat, in that the text is not truncated, but it makes the true multi-day events appear awkward: they cannot be highlighted by styling, and since they repeat each day, they could become staggered, which would look very sloppy. What is needed is a means of preventing the assignment of the multi-day class to items that are not multi-day.
Comment #12
bennettee commentedI experienced this same issue and tracked it to the following line of code.
In calendar_build_week_day function in the calendar_plugin_style.inc file:
change
$all_day = $item->calendar_start_date == $item->calendar_end_date;to
$all_day = $item->calendar_all_day;I don't know if this causes any side-effects, but it seems to fix the problem for me. I hope this helps...I would have submitted a patch for review, but I'm not very familiar with git.
(I originally reported this potential fix in #1264596: Week view shows event in All Day instead of from hour - till hour which I believe was a separate but similar issue.)
Comment #13
pbfleetwood commentedThank you, @bennettee. I'm not using the Week display, but I'll try to see if I can track down similar code that could be affecting the Month display.
Comment #14
bennettee commented@pbfleetwood: IIRC, changing that line fixes all of the displays. It definitely fixes the Month display, though, as that is the only display I am using. Good luck!
Comment #15
pbfleetwood commentedThanks, @bennettee, the code change in #12 works like a charm. I wish that I new a way to override this code without having to directly edit the file in the module; I finally read how to do that with theme_* functions, but that doesn't apply here. Anyway, your fix seems to work very well.
Comment #16
jackalope commented@bennette, thank you so much for figuring this out! I tried your fix and it worked well. I've turned it into a patch which I've hopefully created properly (the advanced patch contributor guide was very helpful, but this was my first shot at doing it the right way.)
Comment #17
carole commentedI've made the change to no effect in any view; the td class is still multi-day. Using latest dev releases of Date, Calendar; cleared cache; here's the code for a double-check; anyone see the error?
foreach ($hour as $key => $item) {
// CS Carole replaced this original line with the next one line per http://drupal.org/node/1264520
// $all_day = $item->calendar_start_date == $item->calendar_end_date;
//
$all_day = $item->calendar_all_day;
Comment #18
SomethingOn commentedThanks Morn your solution worked for me :D
Comment #19
karens commentedConfirmed the problem and the fix. Thanks!
http://drupalcode.org/project/calendar.git/commit/33abfbb
Comment #20
carole commentedI applied the patch and still have the issue in Week & Month views. Cleared cache.
Comment #21
karens commentedThis already fixed in dev, there is no patch to apply. You need to use the latest dev of Date and Calendar.
Comment #23
drzraf commentedI can reproduce using 7.x-3.x-dev
Seems like there are 2 issues :
An "all day" event is considered as a multi-day.
The multi-day class breaks display (what was the subject of this issue but wasn't fixed).
Comment #24
drzraf commentedin
calendar_plugin_style.inc, the following needs explanation (and fixes too):if ($wday == 0 || $start_ydate == $cur_ydate || ($this->date_info->granularity == 'month' && $day_no == 1) || ($all_day && !$is_multi_day))I've an "all day" event which is not a multi-day, thus :
$all_day = TRUE; $is_multi_day = FALSEbut the above conditional passes, thus
$multiday_bucketsis filledthus
$multiday_buckets[$wday][$index]['filled']incalendar_build_month()thus the display bug.
But even changing this strange condition,
$start_ydate == $cur_ydateis TRUE too.Fixing the CSS would probably be needed too, but there's definitely a bug here which needs to get fixed.
Comment #25
andyhu commentedTested with #16 in newest 7.x-3.x-dev, the issue still occurs with a view built with default template which doesn't have an end date. I've made a patch to fix it. The patch also fixes two issues in other tickets which cause all the events in the 7th day of a week not showing at all (depending on whether Monday or Sunday is set as the first day of a week, this could be Saturday or Sunday), as well as an issue that only the first event is shown for every day if the events are not grouped in the week view. Please check the other two tickets here:
http://drupal.org/node/1779154
http://drupal.org/node/1779142
Comment #26
andyhu commentedsorry, please try the latest one
Comment #27
drzraf commenteddoes not solve the bug in my above case
[ please note that your patch is not git-formatted ]
Comment #28
agerson commentedThis is still a problem. I worked around it with "Display multi-day item as a multiple column row"
Comment #29
jaysonjaynes commentedI'm seeing this as well. Events marked as "All day" are treated like Multi-day events, and are adding an empty
Comment #30
tomdisher commentedBumping this again - seems like we're still having this issue. My "all day" events are getting the "multi-day" class.
Comment #31
oleh chemerys commentedIt was still an issue for me, so I wrote a small patch. Hope it will help.
Comment #32
oleh chemerys commentedFound a small issue in my patch. When there was no events on week view, you got an error. Fixed in new patch.
Comment #33
francescosciamanna commented#28 solved the problem for me.
Comment #34
joelpittetComment #35
joelpittetCan you remove the changes in the patch that are unrelated to the fix? Sorry I know this is a really late review, but the whitespace fixes cause conflicts with other patches in the queue potentially and make it hard to review the actual fix.
Comment #36
joshuautley commentedI'm experiencing this with version 7.x-3.6. The above code doesn't seem applicable anymore. Any suggestions?
Some history on how I got here... I updated the Date module from 7.x-2.10 to 7.x-2.11 then back to 7.x-2.10. Most searches around the Date module point back to the Calendar module.
Thank you in advance for any insight.
Comment #37
joelpittetDrupal 7 reached its end of life in January 2025, and Calendar no longer has an active D7 release. Development and support for D7 are not planned going forward, so we’re marking older D7 issues as outdated to help keep the queue focused on current versions.
If this issue is still relevant for Drupal 10+ or a new release line, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome! 💙