, (*1)
Widget that implements the fullcalendar plugin for Yii2, (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
composer require --prefer-dist "tecnocen/yii2-fullcalendar:*"
or add, (*5)
"tecnocen/yii2-fullcalendar": "*"
to the require
section of your composer.json
file., (*6)
Usage
Calendar
This is the basic widget which encapsulates the plugin into a yii\base\Widget
implementation., (*7)
use tecnocen\fullcalendar\widgets\Fullcalendar;
echo Fullcalendar::widget([
// 'lang' => 'es',
'options' => [
// HTML attributes for the container.
// the `tag` option is specially handled as the HTML tag name
],
'clientOptions' => [
// JS Options to be passed to the `calendar()` plugin.
// see http://fullcalendar.com/#Documentation/Options
],
'clientEvents' => [
// JS Events for the `calendar()` plugin.
// see http://fullcalendar.com/#Documentation/Events
]
]);
Language
The fullcalendar plugin provides the [following languages]
(https://github.com/fullcalendar/fullcalendar/tree/master/lang),
Fullcalendar
and ActiveCalendar
support automatic translations using the
$lang
class property which automatically will load the required js file
and customize the plugin call., (*8)
echo Fullcalendar::widget([
'options' => ['id' => 'es-calendar'],
'lang' => 'es',
]);
Will add the JS File es.js
to the view and run, (*9)
jQuery('#es-calendar').calendar({"lang":"es"});
ActiveFullCalendar
AjaxFullCalendar
On the browser., (*10)
Documentation
TODO, (*11)
License
The BSD License (BSD). Please see License File for more information., (*12)