Hey guys, im having quite of a bad time here. I’m using flowing calendar and i’m extending part of it’s functionallity to suit my needs…
basic logic:
calendar, next and previous buttons refresh months through ajax and not reloading the site.
/extensions/flowing-calendar/views/flowingCalendar
$this->storePreviousLink = CHtml::ajaxLink(
"<<",
Yii::app()->createUrl('evento/updateCalendar', <-CONTROLLER
array(
'type'=>'POST',
'data'=>array('month'=>$this->previousMonth,'year'=>$this->yearPreviousMonth),
)), // Yii URL
array('update' => '#CalendarArea') // jQuery selector
);
AND MY CONTROLLER:
public function actionUpdateCalendar(){
if (isset($_POST['month'])){
$mes = $_POST['month'];
$anyo = $_POST['year'];
$this->widget('ext.flowing-calendar.FlowingCalendarWidget', array("month"=>$mes, "year"=>$anyo));
}else{
$this->widget('ext.flowing-calendar.FlowingCalendarWidget', array("month"=>2, "year"=>2014));
}
Yii::app()->end();
}
so basically when i click the next or prev button of the calendar, should switch between months, but my controller ain’t receiving any POST parameters. the refresh works good because it’s rendering february 2014. but there’s no way it can receive POST[month] or POST[year]…
what can i be doing wrong or what other coice do i have?
i’m quite a noob at Yii and Ajax
Thx in advantage