Looking at the code there seems to be some issues with displaying multiday events around the use of the STATE variable.

It stems from the function event_calendar_data and the following code

while (event_is_later($node_end, $cur_date)) {
          if (event_same_day($cur_date, $node->event['end_exploded'])) {
            if ($node->event['end_exploded']['hour'] = '23' && $node->event['end_exploded']['minute'] = '59') {
              $nid->state = 'allday';
            }
            else {
              $nid->state = 'end';
            }
            $data[$rewrite_key][$node->event['end_exploded']['year']][(int)$node->event['end_exploded']['month']][(int)$node->event['end_exploded']['day']][] = drupal_clone($nid);
            break;
          }
          elseif (event_same_day($cur_date, $node->event['start_exploded'])) {
            if ($node->event['start_exploded']['hour'] = '00' && $node->event['start_exploded']['minute'] = '00') {
              $nid->state = 'allday';
            }
            else {
              $nid->state = 'start';
            }
            $data[$rewrite_key][$node->event['start_exploded']['year']][(int)$node->event['start_exploded']['month']][(int)$node->event['start_exploded']['day']][] = drupal_clone($nid);
          }
          else {
            $nid->state = 'ongoing';
            $data[$rewrite_key][$cur_date['year']][(int)$cur_date['month']][(int)$cur_date['day']][] = drupal_clone($nid);
          }
          $cur_date = event_date_later($cur_date, 1);
        }

If we refined the states then we could get a lot more control. At the moment things don't work as the days in the event get varying states none of which are quite right.

See the attached for a modified calendar view that shows the states of the days as they are calculated

I'm quite happy to work on this if we can agree the states. I'd like to work with the following:

State Definition
------ ------------------------------------
ALLDAY Single day event with no time
SINGLEDAY Single day event with start time and/or not end time
START First day of a multi day event
ONGOING Part of a multiday event
END Last day of a multi day event

To do this I need to understand how the Event node object is changing as you work through the days. It would seem sensible to create a day array on the back of the node object, each with its own state but I don't quite understand the $data[$rewrite line

Can someone tell me what the $data[$rewrite_key is doing?

Appreciated

CommentFileSizeAuthor
event.pdf35.54 KBpetetspm

Comments

killes@www.drop.org’s picture

Yes, indeed, this is how the states are supposed to work. There is a lengthy discussion without a conclusion here:

http://drupal.org/node/147422

Currently, it is just buggy.

killes@www.drop.org’s picture

Component: Event Views » Code

not event_views related

petetspm’s picture

Status: Active » Closed (fixed)

Looks like recent fixes makes this redundant