PHP code example of kriss / yii2-calendar-schedule
1. Go to this page and download the library: Download kriss/yii2-calendar-schedule library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kriss / yii2-calendar-schedule example snippets
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
]),
],
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.