CodeIgniter Forums

Full Version: Calendar Not Loading Preferences [FIXED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]wdcmatt[/eluser]
Wow... I was about to post about a problem I was having with the calendar but I figured it out. So to help other people avoid the same problem here is what I learned.

The calendar class only uses the preferences/config of the first instance of its being called.

For example. I called

Code:
$this->load->library('calendar');

In the constructor for my classes, I then (in a method of that class) initialized my preferences and attempted to re-load the calendar library with the new preferences

Code:
$this->load->library('calendar', $pref);

And it didn't work. Where my $pref is a keyed array as defined by the CI documentation. No matter what I changed my $pref's too... my output was locked to the default from CI.

So if you are having problems that no matter how much you change your $pref's your output doesn't change... make sure you have not already called the calendar class with different configs. Hope this saves someone the 40 min headache it caused me.