CodeIgniter Forums
CI Calendar with multiple events per day - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: CI Calendar with multiple events per day (/showthread.php?tid=63382)



CI Calendar with multiple events per day - vertisan - 10-24-2015

Hi!

I have something like this:
http://iv.pl/images/35021795344086662308.png

Now, I need to display more than 1 event on the same day, how do this?

Controller:

PHP Code:
public function index() {

 
$data = array(
 
3  => 'Draft Robot Plans',
 
7  => 'Delivery of Robot Parts',
 
13 => 'Construction Finished',
 
13 => 'Another note on the same day',
 
26 => 'Kill All Humans!'
 
);

 
$vars['calendar'] = $this->calendar->generate(''''$data);

 
$this->load->view'WEB/Index'$vars );

 } 

View:
(in View I only display variable 'calendar')


RE: CI Calendar with multiple events per day - arma7x - 10-24-2015

Try this 13=>'<ul><li>Construction Finished</li><li>Another note on the same day</li></ul>'. If the task is store in array, just loop & append it into variable, etc foreach($foo as $bar){ $baz += $bar;} 13=>$baz


RE: CI Calendar with multiple events per day - PaulD - 10-24-2015

There is a simply brilliant jquery calendar here http://fullcalendar.io/ that I have used many times. It would do all that for you and much much more. It takes a bit of learning but if you just start with a blank calendar and start by adding in some data it is quick to get to grips with.

Hope that helps,

Paul.