Issue 1074: No support needed - Request for documentation addition
Status:  Done
Owner: ----
Closed:  Sep 2011
Reported by tatorf...@gmail.com, Aug 10, 2011
It took me a while to figure this out. I found some fullcalendar tags on stackoverflow similar to what I wanted, but not exactly what I needed and thought maybe the addition of this particular technique might help someone in the future.

This was the URL I found most helpful:
http://stackoverflow.com/questions/6376694/how-can-i-display-another-filed-title-not-an-event-title-on-a-jquery-fullcalenda

My project is basically just a monthly calendar view of many projects that span an entire week. Imagine 10 or so Mon-Fri projects each week with a "project name" as the title and the URL a popup link to the project's properties.

Each project has notes that go along with it and I wanted to add the notes icon to the event "bar" on the calendar. The icon would show that the project has notes or doesn't (varying colors).

Without altering FullCalendar's code, I basically am just passing a non-standard field (notes_image) from my json array and using the eventRender callback to replace the fc-event-title element with the html contained within the notes_image non-standard field.


from json-events.php:

$project_array				= array(
											'id' => $id,
											'title' => "$site_name, $site_state",
											'start' => $project_start_date,
											'end' => $project_end_date,
											'url' => "javascript:dailyNotes('$url')",
											'backgroundColor' => $color,
											'textColor' => $font_face,
											'className' => $note_class,
											'notes_image' => "<img src=\"images/" . $note_class . ".png\" border=\"0\" /> &nbsp; $site_name, $site_state"
										);

from fullCalendar object:

$('#calendar').fullCalendar({
			
			
			eventRender: function (event, element) {
				element.find('.fc-event-title').html(event.notes_image);
			}
		
		});


Since it took me a while to find this and couldn't find an appropriate place to share it (no forums), I thought I would send it in to possibly include with the documentation or downloadable demos.

Thanks!


Sep 29, 2011
Project Member #1 adamrs...@gmail.com
tatorf, thank you for the docs. i am going to expand the docs eventually, and i will remember this. for now ill close it, but bookmark it on my end. thanks
Status: Done