anybody knows how to add events from MySQL database without using this json-events.html? can I render my data from my controller like this :

public function actionGetTasks() {

        $query = Yii::app()->db->createCommand('SELECT TASKID, STARTTIME, ENDTIME

            FROM task');

        $result = $query->queryAll();

        foreach ($result as $row) {

            $data[] = array(

                'id' => $row['TASKID'],

                'title' => $row['TASKNAME'],

                'start' => $row['STARTTIME'],

                'end' => $row['ENDTIME'],

                'allDay' => false,



        echo str_replace("'", '"', json_encode($data));


and my view (calendar.php):

<div class="two_third maincontent_inner">

    <div class="left">




        'data' => array(

        'title' => 'All Day Event',

        'start' => date('Y-m-j')//events from database should be here


        'options' => array(

        'selectable' => true,

        'header' => array(

        'left' => 'prev,next today',

        'center' => 'title',

        'right' => 'month,agendaWeek,agendaDay'



        'htmlOptions' => array(





        <br />

    </div><!-- left -->

</div><!-- two_third -->

and how to change the ‘data’=>array so it can read and put the events from my controller?

thanks in advance.

full calendar is not working for yii v 1.1.14

sry it was my mistake, Now it is working

Hi Paskuale,

I saw one of your link on this link.


Here You describe a way, how to add different event color to different event.

I am using this thing, But still no color are reflecting on my calender for different event.

Even I am not able to change color of all event, through this property.

Here is my code:

$aray[‘eventBackgroundColor’] = ‘#ff0000’;

I am creating array of data.

Please help.


Where can I download fullcalendar for Yii1.1 ?


1 Like