2017 © Pedro Peláez
 

yii2-extension yii2-fullcalendar

an implementation of fullcalendar v3

image

claudejanz/yii2-fullcalendar

an implementation of fullcalendar v3

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

Yii2 Fullcalendar

An implementation of fullcalendar v3. For more information read documentation., (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist claudejanz/yii2-fullcalendar "*"

or add, (*5)

"claudejanz/yii2-fullcalendar": "*"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your view by:, (*7)

echo \claudejanz\yii2fullcalendar\Fullcalendar::widget([
    'clientOptions' => [
        'events'        => \yii\helpers\Url::to(['site/events']),
        'weekends'      => false,
        'defaultView'   => 'agendaWeek',
        'editable'      => false,
        'header'        => [
            'left'  => 'prev,next today ',
            'right' => 'month,agendaWeek,agendaDay'
        ],
    ]
]);

And in your controller by:, (*8)

public function actionEvents($start=NULL,$end=NULL,$timestamp=NULL){

    \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;

    $format = \DateTime::ISO8601;

    $events = [];

    $date = new \DateTime('now');

    $event = new \claudejanz\yii2fullcalendar\models\Event();
    $event->title = "An event";
    $event->start = $date->format($format);
    $date->add(new \DateInterval('PT1H'));
    $event->end = $date->format($format);

    $events[] = $event;

    return $events;
  }

The Versions

08/12 2017

dev-master

9999999-dev

an implementation of fullcalendar v3

  Sources   Download

BSD-4-Clause

The Requires

 

extension yii2 fullcalendar

07/09 2016

1.0.0

1.0.0.0

an implementation of fullcalendar v3

  Sources   Download

BSD-4-Clause

The Requires

 

extension yii2 fullcalendar