efullcalendar Arshaw's FullCalendar as Yii extension

  1. Installation
  2. Usage
  3. Example action
  4. Result
  5. Homepage

This is so far the best calendar library I've seen in my life :) That's what I call a rapid development.

Installation

Just unpack to extensions directory.

Usage

$this->widget('ext.EFullCalendar.EFullCalendar', array(
    // polish version available, uncomment to use it
    // 'lang'=>'pl',
    // you can create your own translation by copying locale/pl.php
    // and customizing it

    // remove to use without theme
    // this is relative path to:
    // themes/<path>
    'themeCssFile'=>'cupertino/theme.css',

    // raw html tags
    'htmlOptions'=>array(
        // you can scale it down as well, try 80%
        'style'=>'width:100%'
    ),
    // FullCalendar's options.
    // Documentation available at
    // http://arshaw.com/fullcalendar/docs/
    'options'=>array(
        'header'=>array(
            'left'=>'prev,next',
            'center'=>'title',
            'right'=>'today'
        ),
        'lazyFetching'=>true,
        'events'=>$calendarEventsUrl, // action URL for dynamic events, or
        'events'=>array() // pass array of events directly

        // event handling
        // mouseover for example
        'eventMouseover'=>new CJavaScriptExpression("js_function_callback"),
    )
));

Example action

public function actionCalendarEvents()
{
    $items[]=array(
        'title'=>'Meeting',
        'start'=>'2012-11-23',
        'color'=>'#CC0000',
        'allDay'=>true,
        'url'=>'http://anyurl.com'
    );
    $items[]=array(
        'title'=>'Meeting reminder',
        'start'=>'2012-11-19',
        'end'=>'2012-11-22',

        // can pass unix timestamp too
        // 'start'=>time()

        'color'=>'blue',
    );

    echo CJSON::encode($items);
    Yii::app()->end();
}

Result

Result

Homepage

15 0
38 followers
4 593 downloads
Yii Version: 1.1
License: MIT
Category: Date and Time
Developed by: emix
Created on: Nov 1, 2012
Last updated: 12 years ago

Downloads

show all

Related Extensions