Welcome Guest, Not a member yet? Register   Sign In
Calendar class problem
#1

[eluser]demogar[/eluser]
Hey there!
I'm getting troubles with the calendar class. I set up the library and it continues with the default configuration.

In the controller
Code:
#Cargando calendario
// Configuraciones
$config = array(
  'start_day'        =>    'monday'
);
        
// Cargando libreria
$this->load->library('calendar', $config);
        
#Mes y año actual
$variables['mes']    = date('n');
$variables['ano']    = date('Y');

In the view
Code:
<?=$this->calendar->generate($ano, $mes); ?>

And the calendar starts sunday... The only way I achieve it to start on mondays is setting this on the calendar library itself.

What I'm doing wrong?

Thank you in advance
#2

[eluser]GSV Sleeper Service[/eluser]
is the calendar library being autoloaded?
#3

[eluser]Yash[/eluser]
use autoload to load calendar class

and use this function
Code:
$config = array(
  'start_day'        =>    'monday'
);
    
            
$this->calendar->initialize($config);
#4

[eluser]demogar[/eluser]
Thank you very much both!
It works great




Theme © iAndrew 2016 - Forum software by © MyBB