-
Integrate jQuery fullcalendar in cakephp
about 9 years ago
-
over 8 years ago
Hi Kronos,
If you want to put the details (lets say you want to put the "description" of the event and for each event there will be different description that you will fetch from db and concatenate it with the event name) follow the steps as below:
For example:
$allevents = array( 'title' =>$event['Event']['eventname'].$event['Event']['description'], 'user' =>$event['Client']['firstname'], 'start' =>$event['Event']['startdate'], 'end' =>$event['Event']['enddate'], 'backgroundColor'=>$eventcolor, 'textColor' =>'#000000' );
Thank you Pushpendra
-
-
over 8 years ago
Thank you pushpen!
Is there a way to put details below event title?
Thank you
-
-
over 8 years ago
Hi Kronos,
As, I have explained in the example that you need to fetch all the required data from the database and create an array for that fetched result set. Make sure that you define the indexes of the array with names that are predefined properties of the jquery calendar. For example I created an array for the fetched result set as below:
$allevents = array( 'title' =>$event['Event']['eventname'], 'user' =>$event['Client']['firstname'], 'start' =>$event['Event']['startdate'], 'end' =>$event['Event']['enddate'], 'backgroundColor'=>$eventcolor, 'textColor' =>'#000000' );
indexes defined are 'title','user','start','end','backgroundColor','textColor' all are properties, that are predefined for jquery calendar in this way you can found more options.
Now to see the output copy paste the code written in my file event_calendar.ctp and replace the array $allevents with your array and execute the code.
Thank you.
-
-
over 8 years ago
Hello! Im a beginner. I have a db with sessions and their dates. How do I pass this data to the calendar?
-
4 Comment(s)