xlerr/fullcalendar

此包已被弃用且不再维护。未建议替代包。

yii2 fullcalendar

此包尚无发布版本,可用的信息不多。


README

基于https://fullcalendar.io/

demo

示例

echo FullcalendarWidget::widget([
    'pluginOptions' => [
        'customButtons' => [
            'new' => [
                'text' => '新事件',
                'click' => new JsExpression('function() { // todo }'),
            ],
            'all' => [
                'text' => '事件列表',
                'click' => new JsExpression('function () { // todo }'),
            ],
        ],
        'headerToolbar' => [
            'end' => 'dayGridMonth,timeGridWeek,timeGridDay,listWeek new,all',
        ],
        'eventTimeFormat' => [ // like '14:30'
            'hour' => '2-digit',
            'minute' => '2-digit',
            'hour12' => false,
        ],
        // 'aspectRatio' => 2.14,
        'dayMaxEventRows' => true, // for all non-TimeGrid views
        // 'contentHeight' => 1000,
        'events' => [
            [
                'title' => '节假日',
                'start' => '2021-05-01',
                'display' => 'background',
                'color' => 'coral',
            ],
            [
                'title' => '节假日',
                'start' => '2021-05-02',
                'display' => 'background',
                'color' => 'coral',
            ],
            [
                'title' => '节假日',
                'start' => '2021-05-03',
                'display' => 'background',
                'color' => 'coral',
            ],
            [
                'title' => '节假日',
                'start' => '2021-05-04',
                'display' => 'background',
                'color' => 'coral',
            ],
            [
                'title' => '节假日',
                'start' => '2021-05-05',
                'display' => 'background',
                'color' => 'coral',
            ],
            [
                'title' => '工作日',
                'start' => '2021-05-08',
                'display' => 'background',
            ],
        ],
//        'eventSources' => [
//            Url::to(['event-list']),
//        ] 
    ],
]);