Home » Php » php – Problems with displaying data in codeigniter calendar

php – Problems with displaying data in codeigniter calendar

Posted by: admin February 25, 2020 Leave a comment

Questions:

I have a very interesting problem. I am passing event data to Codeigniter Calendar. The events which fall on the first 10 days of the month don’t get highlighted.

Here is my code :

$details = array(); $proDate;
    if($calendarentries != NULL){
        foreach ($calendarentries as $row){
            $edate = $row['edate'];
            $procDate = strtotime($edate);
            $day =  date('d',$procDate);
            $details[$day] = $row['cevent'];
        }
    }
    $data['calendar'] = $this->calendar->generate($year, $month, $details);
    $data['month'] = $monthName;
    $data['year'] = $year;
    $data['details'] = $details;
    $this->load->view('design/patna/header' , $data);
    $this->load->view('design/patna/nav' , $data);
    $this->load->view('content/patna/calendar' , $data);
    $this->load->view('design/patna/footer' , $data);

Display

This happens for all months. Need advice. Thanks

How to&Answers: