Hello,

most of the users don't want to enter time values with seconds and end times like 23:59:59, so it would be nice if the end-time 00:00 (next day) would not become multi-day.

Any idea where I can change the code?

Thanks!

Comments

root66’s picture

Status: Active » Needs review

I've found a way:

In "function explode_values($event)" (calendar_plugin_row.inc) on line 576 change

this:

else {
        $entity->date_id .= '.' . $pos;

        $rows[] = $entity;
        unset($entity);
}

to:

else if($entity->calendar_start != $entity->calendar_end) {
        $entity->date_id .= '.' . $pos;

        $rows[] = $entity;
        unset($entity);
}

And the last day event beginning at 0:00 and ending at the same time 0:00 will not be added.

sassafrass’s picture

I think this might work, except that in the case where

$entity->calendar_start == $entity->calendar_end we still need to unset($entity);

Therefore, I would propose replacing lines 571 through line 581

if (isset($entity) && (empty($entity->calendar_start))) {
        // if no date for the node and no date in the item
        // there is no way to display it on the calendar
        unset($entity);
}
else {
       $entity->date_id .= '.' . $pos;
        $rows[] = $entity;
        unset($entity);
}

with

if ($entity->calendar_start != $entity->calendar_end) {
        $entity->date_id .= '.' . $pos;
        $rows[] = $entity;
}
unset($entity);
Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)