tecnocen/yii2-fullcalendar

Yii2 Widgets for the Full Callendar javascript calendar

Installs: 2 882

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 1

Open Issues: 0

Type:yii2-extension

0.1 2016-07-07 22:42 UTC

This package is auto-updated.

Last update: 2024-11-05 07:42:10 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Widget that implements the fullcalendar plugin for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist "tecnocen/yii2-fullcalendar:*"

or add

"tecnocen/yii2-fullcalendar": "*"

to the require section of your composer.json file.

Usage

Calendar

This is the basic widget which encapsulates the plugin into a yii\base\Widget implementation.

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.

echo Fullcalendar::widget([
    'options' => ['id' => 'es-calendar'],
    'lang' => 'es',
]);

Will add the JS File es.js to the view and run

jQuery('#es-calendar').calendar({"lang":"es"});

ActiveFullCalendar

AjaxFullCalendar

On the browser.

Documentation

TODO

License

The BSD License (BSD). Please see License File for more information.