advance-calender

Calender to show events with ajax load feature
6 followers

This extension is an advance version of flowing-calender

I really liked it and needed it to show events along with ajax load. Hope it may be of use to others looking for the same.

Requirements

Yii 1.1 or above

Installation

Extract the release file under protected/extensions

Usage

$this->widget('ext.calendar-advance.AdvanceCalendarWidget',array('month'=>$month, 'year'=>$year, 'events'=>$events));

I am assuming the events array to be of this format. Unix timestamp and the display content

Array
(
    [0] => Array
        (
            [rdate] => 1359657000
            [html] => 01 February, Friday
        )
 
    [1] => Array
        (
            [rdate] => 1359916200
            [html] => 04 February, Monday
        )
)

Set time zone and ajax controller in init()

date_default_timezone_set('Asia/Kolkata');
$ajaxRouteString = Yii::app()->controller->id."/cal";

Define your events array keys in AdvanceCalendarWidget.php as in the array above.

public $udate_key = 'rdate';
public $event_key = 'html';

Resources

Project page

Total 3 comments

#16938 report it
frantgn90 at 2014/04/14 01:20pm
Thanks!!

It's fantastic. A little modification for the countries where the week starts at monday: $running_day = (date('w',mktime(0,0,0,$this->month,1,$this->year)) + 6)%7;

:)

#13181 report it
snowwalker at 2013/05/11 03:18pm
Thanks

Thanks :)

#13179 report it
rajesh chaurasia at 2013/05/11 09:29am
nice

nice extension.enjoy yii

Leave a comment

Please to leave your comment.

Create extension