Yii Framework Forum: FullCalendar - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

FullCalendar Rate Topic: -----

#21 User is offline   dyooolicious 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 109
  • Joined: 18-October 12
  • Location:Surabaya, East Java, Indonesia

Posted 21 November 2012 - 11:21 PM

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">
        <?php
        $this->widget('application.extensions.fullcalendar.FullcalendarGraphWidget',
        array(
        '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.
keep learning, trying and praying makes you keep going !
tweet me : @dyooolicious
http://ini-infonya.blogspot.com/
0

#22 User is offline   rupnin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-April 14

Posted 17 April 2014 - 02:45 AM

full calendar is not working for yii v 1.1.14
0

#23 User is offline   rupnin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-April 14

Posted 20 April 2014 - 11:24 PM

View Postrupnin, on 17 April 2014 - 02:45 AM, said:

full calendar is not working for yii v 1.1.14

sry it was my mistake, Now it is working
0

#24 User is offline   raghavAgarwal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 21-March 13
  • Location:Noida

Posted 03 June 2014 - 07:40 AM

View Postpaskuale, on 15 May 2012 - 01:49 AM, said:



Hi Paskuale,

I saw one of your link on this link.
http://www.yiiframew...6-fullcalendar/

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.

Thanks
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users