Ralph Macalino Ralph Macalino - 1 year ago 81
PHP Question

CodeIgniter Calendar Preferences template not working

Here is my


$prefs = array(
'month_type' => 'long',
'day_type' => 'short',
'show_next_prev' => true,
'next_prev_url' => base_url('calendar/index'),
'show_other_days' => true,

$prefs['template'] = array(
'table_open' => "<table class='calendar'>",
'cal_cell_start' => '<td class="day">',
'cal_cell_start_today' => '<td class="today">'

Then here is the output when i run this code.

echo '<pre>';
echo '</pre>';die();

[month_type] => long
[day_type] => short
[show_next_prev] => 1
[next_prev_url] => http://localhost/MeemoStore/calendar/index
[show_other_days] => 1
[template] => Array
[table_open] =>
[cal_cell_start] =>
[cal_cell_start_today] => ) )

I've configured a calendar before and i had no problem with it. Can anyone help me out?


$this->load->library('calendar', $prefs);
echo $this->calendar->generate($year, $month); die();


<table border="0" cellpadding="4" cellspacing="0">

<th colspan="7">October&nbsp;2016</th>










The template didn't affect the table.

Answer Source

The calendar library was on autoload file, i removed it from there and it is now working. Sorry for the post!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download