PHP code example of professionalweb / fullcalendar-widget-yii2
1. Go to this page and download the library: Download professionalweb/fullcalendar-widget-yii2 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/ */
professionalweb / fullcalendar-widget-yii2 example snippets
use yii\web\JsExpression;
use professionalweb\FullcalendarWidget\FullcalendarWidget;
echo FullcalendarWidget::widget([
'options' => [
'id' => 'calendar'
],
'pluginOptions' => [
'header' => [
'left' => 'prev,next today',
'center' => 'title',
'right' => 'month,agendaWeek,agendaDay'
],
'lang' => 'ru',
'firstDay' => 1,
'selectable' => true,
'events' => $data,
'select' => new JsExpression('function(start, end, allDay) {
console.log(addZero(start.date())+"."+addZero(start.month()+1)+"."+start.year());
}
')
]
]);