Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6721989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:23:39+00:00 2026-05-26T09:23:39+00:00

In fullcalendar you can select an event (which triggers) the eventClick function/callback. What I

  • 0

In fullcalendar you can select an event (which triggers) the eventClick function/callback. What I would like to do is highlight the day of the event when the event is clicked (in month view).

For example, if the event is on October 30 and I select the event I would like the background color of the day to be highlighted. This is very similar to how fullcalendar handles “today” where it highlights today in a yellowish color.

I can’t seem to figure out how to tie the fc-event class or the event object itself to the actual day div in the calendar. My October 30th event appears within the following div (which is the October 30 box):

<div class="fc-sun fc-widget-content fc-day35 fc-first">

How can I find this div (so that I can highlight it) based on the event object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:23:40+00:00Added an answer on May 26, 2026 at 9:23 am

    Sorry this is a rough solution, mostly from memory, as I’m not set up with any dev tools at this computer.

    Hopefully this is what you’re looking for!

    //create fullCalendar:
    $("#calendar").fullCalendar({
        /* options */
    
        eventClick: function(event, jsEvent){
            //use the passed-in javascript event to get a jQuery-wrapped reference
            //to the DOM element we clicked on.
            //i can never remember if this is .target, .currentTarget, or .originalTarget
            //... jquery has spoiled me
            var $clickedEvent = $(jsEvent.target);
    
            //tell the "selectionManager" to find the day this event belongs to,
            //and add the "selected" css class to it
            selectionManager.select($clickedEvent);
        }
    });
    
    //define an object that handles the adding-removing of the 'selectedDay' css class
    var selectionManager = (function(){
        //i like making private variables :-)
        var $curSelectedDay = null
    
        //define a "select" method for switching 'selected' state
        return {
            select: function($newEvent) {
                if ($curSelectedDay){
                    //if we already had a day chosen, let's get rid of its CSS 'selectedDay' class
                    $curSelectedDay.removeClass("selectedDay");
                }
                //find the parent div that has a class matching the pattern 'fc-day', and add the "selectedDay" class to it
                $curSelectedDay = $thisEvent.closest('div[class~="fc-day"]').addClass("selectedDay");
            }       
        };
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I achieve a day click event on fullcalendar ? What I want
I'm using jQuery Fullcalendar from arshaw.com/fullcalendar/ and I would like to replace day number
I know its possible to receive a dayClick event on Fullcalendar. But I would
I have a jquery fullcalendar . I would like to trigger jquery QTip (or
Which fragment of code bellow can not work in MSIE? $(document).ready(function() { var minId;
I'm using the FullCalendar module for Drupal 7. What I would like to do
I'm messing around with FullCalendar jQuery calendar, and qTips, so that I can display
This question about jquery plugin fullcalendar. How I can return to selected date after
I'm using the FullCalendar plugin, and am very pleased with it, however I can't
Hello , I am using arshaw fullcalendar v1.5.2 (only month view ) for property

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.