All Projects → philippfrenzel → Yii2fullcalendar

philippfrenzel / Yii2fullcalendar

Licence: gpl-2.0
JQuery Fullcalendar Yii2 Extension

Projects that are alternatives of or similar to Yii2fullcalendar

Yii2 Phone Input
Yii2 International telephone numbers
Stars: ✭ 114 (-5%)
Mutual labels:  yii2, yii2-extension
Ar Linkmany
ActiveRecord behavior for saving many-to-many relations
Stars: ✭ 83 (-30.83%)
Mutual labels:  yii2, yii2-extension
Yii2 Jwt
JWT implementation for Yii2 Authorization process
Stars: ✭ 61 (-49.17%)
Mutual labels:  yii2, yii2-extension
Yii2 Psr Log Target
Yii 2.0 log target that is able to write messages to PSR-3 compatible logger
Stars: ✭ 58 (-51.67%)
Mutual labels:  yii2, yii2-extension
Yii2 Cart
Yii2 shopping cart
Stars: ✭ 118 (-1.67%)
Mutual labels:  yii2, yii2-extension
Sitemap
Site map creation support
Stars: ✭ 59 (-50.83%)
Mutual labels:  yii2, yii2-extension
Csv Grid
Yii2 extension for CSV export
Stars: ✭ 83 (-30.83%)
Mutual labels:  yii2, yii2-extension
Yii2 Social Share
With this extension you can share data from your web pages to any social network!
Stars: ✭ 48 (-60%)
Mutual labels:  yii2, yii2-extension
File Storage
File storage abstraction for Yii2
Stars: ✭ 116 (-3.33%)
Mutual labels:  yii2, yii2-extension
Yii2 Gallery Manager
Stars: ✭ 90 (-25%)
Mutual labels:  yii2, yii2-extension
Php frameworks analysis
php框架源码分析
Stars: ✭ 57 (-52.5%)
Mutual labels:  yii2, yii2-extension
Admin
Admin pack (actions, widgets, etc) for Yii2
Stars: ✭ 100 (-16.67%)
Mutual labels:  yii2, yii2-extension
Config
Yii2 application runtime configuration support
Stars: ✭ 54 (-55%)
Mutual labels:  yii2, yii2-extension
Yii2 Collection
Collection extension for Yii 2
Stars: ✭ 62 (-48.33%)
Mutual labels:  yii2, yii2-extension
Yii2 Rabbitmq
RabbitMQ Extension for Yii2
Stars: ✭ 52 (-56.67%)
Mutual labels:  yii2, yii2-extension
Yii2 Schemadump
Generate the schema from an existing database.
Stars: ✭ 78 (-35%)
Mutual labels:  yii2, yii2-extension
Yii2 Lifecycle Behavior
Define the lifecycle of a model by defining allowed status changes.
Stars: ✭ 47 (-60.83%)
Mutual labels:  yii2, yii2-extension
Yii2 Editable
Editable widget and column for gridview.
Stars: ✭ 47 (-60.83%)
Mutual labels:  yii2, yii2-extension
Yii2 Aws S3
An Amazon S3 component for Yii2
Stars: ✭ 86 (-28.33%)
Mutual labels:  yii2, yii2-extension
Yii2 Migrik
Yii2 Gii-tools for create migration files
Stars: ✭ 99 (-17.5%)
Mutual labels:  yii2, yii2-extension

yii2fullcalendar

JQuery Fullcalendar Yii2 Extension JQuery from: http://arshaw.com/fullcalendar/ Version 4.0.2 License MIT

JQuery Documentation: http://arshaw.com/fullcalendar/docs/ Yii2 Extension by [email protected]

A tiny sample can be found here: http://yii2fullcalendar.beeye.org

Latest Stable Version Build Status Code Climate License

Installation

Package is although registered at packagist.org - so you can just add one line of code, to let it run!

add the following line to your composer.json require section:

  "philippfrenzel/yii2fullcalendar":"*",

or run:

$ php composer.phar require philippfrenzel/yii2fullcalendar "*"

And ensure, that you have the following plugin installed global:

php composer.phar global require "fxp/composer-asset-plugin:~1.0"

Changelog

17-04-2019 Updated to latest 4.0.2 Stable Version of the library 19-01-2017 Updated to include non-standard fields 29-11-2014 Updated to latest 2.2.3 Version of the library

Usage

Quickstart Looks like this:

  $events = array();
  //Testing
  $Event = new \yii2fullcalendar\models\Event();
  $Event->id = 1;
  $Event->title = 'Testing';
  $Event->start = date('Y-m-d\TH:i:s\Z');
  $Event->nonstandard = [
    'field1' => 'Something I want to be included in object #1',
    'field2' => 'Something I want to be included in object #2',
  ];
  $events[] = $Event;

  $Event = new \yii2fullcalendar\models\Event();
  $Event->id = 2;
  $Event->title = 'Testing';
  $Event->start = date('Y-m-d\TH:i:s\Z',strtotime('tomorrow 6am'));
  $events[] = $Event;

  ?>

  <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
      'events'=> $events,
  ));

Note, that this will only view the events without any detailed view or option to add a new event.. etc.

Non-Standard fields

You can add non-standard fields via the non-standard fields array, for which you can pass any key/value pair, as described in the Event Fields documentation.

So, using the Quick Start example above, you can read field1 and fields2 in your JavaScript using notation similar to event.nonstandard.field1 and event.nonstandard.field2.

AJAX Usage

If you wanna use ajax loader, this could look like this:

20171023 ajaxEvents are replaced by events - pls. check fullcalendar io documentation for details

<?= yii2fullcalendar\yii2fullcalendar::widget([
      'options' => [
        'lang' => 'de',
        //... more options to be defined here!
      ],
      'events' => Url::to(['/timetrack/default/jsoncalendar'])
    ]);
?>

and inside your referenced controller, the action should look like this:

public function actionJsoncalendar($start=NULL,$end=NULL,$_=NULL){

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

    $times = \app\modules\timetrack\models\Timetable::find()->where(array('category'=>\app\modules\timetrack\models\Timetable::CAT_TIMETRACK))->all();

    $events = array();

    foreach ($times AS $time){
      //Testing
      $Event = new \yii2fullcalendar\models\Event();
      $Event->id = $time->id;
      $Event->title = $time->categoryAsString;
      $Event->start = date('Y-m-d\TH:i:s\Z',strtotime($time->date_start.' '.$time->time_start));
      $Event->end = date('Y-m-d\TH:i:s\Z',strtotime($time->date_end.' '.$time->time_end));
      $events[] = $Event;
    }

    return $events;
  }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].