Issue 1215: Color the entire day on eventClick
Status:  WontFix
Owner: ----
Closed:  Aug 2013
Reported by thibaud....@gmail.com, Dec 19, 2011
Hi,

I am trying to color the background of a day if an eventClick on this day has occured.
Unfortunately, the only options I found were to color the event itself, but not the day.
I am looking for a way to get the <td> of a day, when an eventClick has occured.

Regards,
Jun 25, 2012
#1 tushardh...@gmail.com
Hi 

eventClick: function(calEvent, jsEvent, view) {
	var mousex = jsEvent.pageX;
	var mousey = jsEvent.pageY;
	$('td').each(function(index) {
	var offset = $(this).offset();
	if ((offset.left + $(this).outerWidth()) > mousex && offset.left < mousex && (offset.top + $(this).outerHeight()) > mousey && offset.top < mousey) {

	if ($(this).hasClass('fc-other-month')){
	//Its a day on another month
	//a high minus number means previous month
	//a low minus number means next month
	day = '-' + $(this).find('.fc-day-number').html();
	$(this).css('background-color', 'yellow');
	}
	else
	{
	//This is a day on the current month
	day = $(this).find('.fc-day-number').html();
	$(this).css('background-color', 'red');
	}
				                    
	alert(day);
	}
	});

Hope this will solve your problem

Jul 8, 2012
#2 thibaud....@gmail.com
Hi,

Thanks for the reply, will implement this in my code ;)

Regards.
Aug 14, 2013
Project Member #3 adamrs...@gmail.com
(No comment was entered for this change.)
Status: WontFix
Feb 8, 2014
#4 bernard...@gmail.com
Hi, 
Is there a way to deselect the background of the day of the eventClick when selecting another day (both with a different event and without an event)?