When a node's date field does not include an end time, that node is displayed as a multi-day event on the calendar month view. Because it is not actually a multi-day event, it gets cut off in the calendar. See the attached screenshots for the event when it's assigned the "multi-day" class and when I manually change it to the "single-day" class.

Comments

mErilainen’s picture

Hmm, 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.

jackalope’s picture

Hmm... 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!

mErilainen’s picture

Have 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.

nemo_Anhoa’s picture

Is there any other method than change settings for this one ?
I got the css class turn into multi-day also.

afsolano’s picture

subscribing -- same issue

davident’s picture

subscribing -- same issue

My temp fix was to use some jQuery to remove the 'multi-day' class from the td.

thinkdrupal’s picture

I 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.

pbfleetwood’s picture

I have the same problem on both month and week displays.

pbfleetwood’s picture

Priority:Normal» Major

It'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.

Morn’s picture

Setting Mutlti-day style (in the Month Options) as
"Display multi-day item as a single column"
is an easy workaround.

pbfleetwood’s picture

Thank 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.

bennettee’s picture

I 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.)

pbfleetwood’s picture

Thank 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.

bennettee’s picture

@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!

pbfleetwood’s picture

Thanks, @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.

jackalope’s picture

Status:Active» Needs review
StatusFileSize
new782 bytes

@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.)

carole’s picture

I'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;

SomethingOn’s picture

Thanks Morn your solution worked for me :D

KarenS’s picture

Status:Needs review» Fixed

Confirmed the problem and the fix. Thanks!

http://drupalcode.org/project/calendar.git/commit/33abfbb

carole’s picture

StatusFileSize
new27.6 KB

I applied the patch and still have the issue in Week & Month views. Cleared cache.

KarenS’s picture

This already fixed in dev, there is no patch to apply. You need to use the latest dev of Date and Calendar.

Status:Fixed» Closed (fixed)

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

drzraf’s picture

Status:Closed (fixed)» Active

I 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).

drzraf’s picture

in 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 = FALSE
but the above conditional passes, thus $multiday_buckets is filled
thus $multiday_buckets[$wday][$index]['filled'] in calendar_build_month()
thus the display bug.

But even changing this strange condition, $start_ydate == $cur_ydate is TRUE too.
Fixing the CSS would probably be needed too, but there's definitely a bug here which needs to get fixed.

andyhu’s picture

StatusFileSize
new2.24 KB

Tested 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

andyhu’s picture

Status:Active» Needs review
StatusFileSize
new2.43 KB

sorry, please try the latest one

drzraf’s picture

does not solve the bug in my above case
[ please note that your patch is not git-formatted ]

agerson’s picture

This is still a problem. I worked around it with "Display multi-day item as a multiple column row"

jaysonjaynes’s picture

I'm seeing this as well. Events marked as "All day" are treated like Multi-day events, and are adding an empty

under them, like it does with multi-day, truncating the title and making it not readable. Subscribe.
tomdisher’s picture

Issue summary:View changes

Bumping this again - seems like we're still having this issue. My "all day" events are getting the "multi-day" class.

oleg chemerys’s picture

It was still an issue for me, so I wrote a small patch. Hope it will help.

oleg chemerys’s picture

Found a small issue in my patch. When there was no events on week view, you got an error. Fixed in new patch.