Fullcalendar - 单独显示范围事件

问题描述 投票:0回答:1

我正在使用fullCalendar 3.10,我有以下事件:

        $event_list[] = Calendar::event(
            $event->name,
            false,
            new \DateTime($event->start_date.' '.$event->start_time),
            new \DateTime($event->end_date.' '.$event->end_time),
            $event->id,
            [
                'color' => '#f05050',
                'slug' => $event->slug,
                'url' => 'event/'.$event->slug,
            ]
        );

现在假设事件在01.04.2019到04.04.2019的日期范围内,如何在月视图中将其显示为单个事件块而不是拉伸事件块?谢谢

javascript jquery laravel fullcalendar
1个回答
0
投票

我找到了一个简单的解决方案:

$event_list[] = Calendar::event(
            $event->name,
            false,
            new \DateTime($event->start_date.' '.$event->start_time),
            new \DateTime($event->end_date.' '.$event->end_time),
            rendering: 'background',
            backgroundColor = '#f05050',
            $event->id,
            [
               // 'color' => '#f05050',
                'slug' => $event->slug,
                'url' => 'event/'.$event->slug,
            ]
        );
© www.soinside.com 2019 - 2024. All rights reserved.