xlerr/fullcalendar

This package is abandoned and no longer maintained. No replacement package was suggested.

yii2 fullcalendar

Maintainers

Details

github.com/xlerr/fullcalendar

This package has no released version yet, and little information is available.


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']),
//        ] 
    ],
]);