Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1st bad reason to make request to <code>protected</code>, You need to create action for output json</p> <p>in TaskController.php </p> <pre><code>public function actionGetTasks() { $query = Yii::app()-&gt;db-&gt;createCommand('SELECT TASKID, STARTTIME, ENDTIME FROM task'); $result = $query-&gt;queryAll(); foreach ($result as $row) { $data[] = array( 'id' =&gt; $row['TASKID'], 'start' =&gt; $row['STARTTIME'], 'end' =&gt; $row['ENDTIME'], 'allDay' =&gt; false, 'editable' =&gt; true, ); } echo json_encode($data); } </code></pre> <p>Change path in fullcalendar</p> <pre><code>jQuery('#calendar').fullCalendar({ eventSources: [ // your event source { url: '/path/todirectory/index.php?r=task/getTasks', </code></pre> <p>For draggable you requirements read this: <a href="http://arshaw.com/fullcalendar/docs/event_ui/Requirements/" rel="nofollow">http://arshaw.com/fullcalendar/docs/event_ui/Requirements/</a></p> <p>Do you add <code>Yii::app()-&gt;ClientScript-&gt;registerCode('jquery.ui');</code> ?</p> <hr> <p>Update:</p> <p>You need include any js via Yii::app()->clientScript->registerScriptFile, </p> <p>and where you're include js you need also add before : (it may be in /views/layout/main.php)</p> <pre><code>Yii::app()-&gt;ClientScript-&gt;registerCode('jquery.ui'); Yii::app()-&gt;ClientScript-&gt;registerScriptFile(Yii::app()-&gt;baseUrl . '/js/plugins/fullcalendar.min.js'); Yii::app()-&gt;ClientScript-&gt;registerScriptFile(Yii::app()-&gt;baseUrl . '/js/custom/calendar.js'); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload