Calendar Multiple Events Per Day (Available) |
[eluser]Unknown[/eluser]
Because yesterday i've search the forum and i saw many people search for a way to have multiple events per day on the codeigniter calendar. Here is the code that i made in order my calendar to have multiple events per day. The calendar is based on the nettus tutorial if anyone interested and can be found here: [email=http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-the-calendar-library/]Nettuts Codeignitter Calendar[/email] Step 1) make sure the nettuts way of calendar work on you. Step 2) copy the calendar.php from system/libraries to application/libraries Step 3) make an adjustment in the calendar.php library in line 217 and put the code below (Thanks to member zoltano): Code: if (isset($data[$day])) Step 4) now on the calendar model you must make your output array. The code you must put on the get_calendar_data function of the model is shown below: Code: function get_calendar_data($year, $month) { Result on photo here: Multiple Events Codeigniter Calendar Good luck coding.
[eluser]Unknown[/eluser]
can you explain the last function? why isn't it displaying the events after loading the calendar, the event will only show when i click the prev or next on the calendar |
Welcome Guest, Not a member yet? Register Sign In |