kriss / yii2-calendar-schedule
Yii2 日历调度
v2.1
2021-12-03 01:30 UTC
Requires
- npm-asset/fullcalendar: ^5.5
- yiisoft/yii2: ~2.0.0
Requires (Dev)
- kriss/foxy-yii2-convert: v1.4
This package is auto-updated.
Last update: 2024-08-29 04:37:45 UTC
README
Yii2 FullCalendar 调度
安装
composer require kriss/yii2-calendar-schedule
提示
master 分支在 2.x,需要 1.x 版本?请查看 1.x 分支
用法
use kriss\calendarSchedule\widgets\FullCalendarWidget; use kriss\calendarSchedule\widgets\processors\EventProcessor; use kriss\calendarSchedule\widgets\processors\HeaderToolbarProcessor; use kriss\calendarSchedule\widgets\processors\LocaleProcessor; echo FullCalendarWidget::widget([ 'calendarRenderBefore' => "console.log('before', calendar)", 'calendarRenderAfter' => "console.log('after', calendar)", 'clientOptions' => [ // all options from fullCalendar ], 'processors' => [ // quick solve fullCalendar options new LocaleProcessor([ 'locale' => 'zh-cn', ]), new HeaderToolbarProcessor(), new EventProcessor([ // use Array /*'events' => [ ['title' => 'aaa', 'start' => time(), 'end' => time() + 10 * 3600], ],*/ // use Ajax 'events' => ['site/events'], // see FullCalendarEventsAction ]), ], ]);
更多请查看 演示