Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qTip color matching fullcalendar event color
21st October, 07:28 (This post was last modified: 21st October 08:24 by lramesha.)
Post: #1
qTip color matching fullcalendar event color
I am integrating qTip with fullcalendar, but i got requirement to make qTip background color be same as fullcalendar event color. There are 5 different types of events and each event has different color in the calendar.
Are there is a way to ensure qTip background be same as fullcalendar event color?
here is code

JS Code
$(document).ready(function() {
 
InitializeCalendar();
        var custom_buttons = '<td style="padding-left:10px">' +
                                    '<div class="fc-button-next ui-state-default ui-corner-left ui-corner-right" style="background-color:white;border:0;">' +
                                        '<span>' +
                                            '<input type="hidden" id="date_picker" value="" />' +
                                            '<img src="/cal_icon.gif" id="datePickerImage" />' +
 
                                        '</span>' +
                                    '</div>' +
                                '</td>';
        $('.fc-header-title').parent('td').after(custom_buttons);
 
 
        $("#date_picker").datepicker({
            dateFormat: 'dd-mm-yy',
	numberOfMonths: 2,
 
            changeMonth: false,
            changeYear: false,
            onSelect: function(dateText, inst) {
                var d = $("#date_picker").datepicker("getDate");
                $('#calendar').fullCalendar('gotoDate', d);
            }
        });
 
        $('#datePickerImage').click(function() {
            $('#date_picker').datepicker('show');
        });
 
        $('#datePickerImage').mouseout(function() {
            $('#date_picker').datepicker('hide');
        });
 
})
function  InitializeCalendar()
{
		var date = new Date();
		var d = date.getDate();
		var m = date.getMonth();
		var y = date.getFullYear();
 
		$('#calendar').fullCalendar({
		   editable: false,
		   disableDragging: true,
		   disableResizing: true,
			header: {
				left: 'prev,next today',
				center: 'title',
				right: 'month,agendaWeek,agendaDay'
			},
 
			editable: false,
			events: [
 
				{
					title: 'Other',
					description: 'OtherDate: 13.10.2010Start: 5:0',
					myStyle: 'eventColor_orange', 
					start: new Date(2010, 9, 13, 5, 0),
					end: new Date(2010, 9, 13, 6, 0),
					allDay: false,
					className: 'eventColor_orange', 
 
				}, 
				{
					title: 'Consumer Protection',
					description: 'Consumer ProtectionDate: 20.10.2010Start: 9:30',
					myStyle: 'eventColor_red', 
					start: new Date(2010, 9, 20, 9, 30),
					end: new Date(2010, 9, 19, 10, 30),
					allDay: false,
					className: 'eventColor_orange', 
 
				}
			],
      eventRender: function(event, element) {
                        element.qtip({
		   overwrite: false,
                                        content : event.description,
                                        position: {corner: {target: 'rightTop', tooltip: 'leftMiddle'},
  adjust: {
                screen: false 
          }
},  
style: {
            background: '#c6cbd6',
            border: {
                  color: '#ABABAB',
                  radius: 2 
                  },
            tip: true 
        },
		   show: { when: 'focus', fixed: true },
                                   hide: { when: 'unfocus', fixed: true },
		show: { when: 'mouseover', fixed: true },
                                   hide: { when: 'mouseout', fixed: true }
                                     });
                    }
		});
 
	}
Find all posts by this user
Quote this message in a reply
26th October, 23:51
Post: #2
RE: qTip color matching fullcalendar event color
Hmm, prehaps the event type is stored in the vent object passed in eventRender? That way you could detected the type and set the colour accordingly?

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  qtip with jquery mobile tap event finedesignz 1 642 4th January 21:18
Last Post: Craig
  Google Calendar like bubble for Jquery FullCalendar tdmohr 13 13,002 18th October 07:22
Last Post: jokepondy
  Tooltip above mouse on event. Muhd 1 829 26th June 12:34
Last Post: Craig
  [Solved] beforeShow event - can't update the tip position to a new value byte_slave 4 1,200 1st April 22:14
Last Post: byte_slave
  [Solved] Tip Color Stays Black in IE mikelcelestial 0 449 23rd December 10:00
Last Post: mikelcelestial
  [Solved] Simple apply event bindings onShow bigorangemachine 5 1,329 24th November 14:29
Last Post: bigorangemachine
  Area Color Change with qTip - PLEASE HELP EMB 2 1,480 27th October 00:13
Last Post: Craig
  [Solved] Nothing displayed when first click event, Please help me out. jackeyfan 4 1,998 30th August 13:09
Last Post: jackeyfan
  [Solved] Dynamically display qtip (not event driven) shershon 3 1,982 23rd August 19:36
Last Post: shershon
  Change qtips position after event... kanodoe 3 1,536 13th July 10:04
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)