Q:

Fullcalendar getting its parent colspan

I'm using fullcalendar and I'm trying to get the element's parent and its colspan value but I get undefined. Here's the summary of my code
JAVASCRIPT
$scope.eventRender = function (event, element, view) {
    element.addClass(event.title);
    let parent = element.parent();
    console.log(parent.prop("colspan"));
};

HTML
 <td class="fc-event-container" colspan="6">
   <a class="fc-day-grid-event fc-h-event fc-event fc-start fc-not-end fc-draggable BR0000092" style="background-color:#f1c40f;border-color:#f1c40f;color:#000">
     <div class="fc-content"> 
       <span class="fc-title">BR0000092</span>
     </div>
   </a>
 </td>

REFERENCE: How to get the value of colspan

A:

As per the documentation at https://fullcalendar.io/docs/event_rendering/eventRender/,  eventRender runs after the element has been created but before it is placed on the calendar. It says

element is a newly created jQuery element that will be used for rendering.

Note the future tense - "will be used". It has not been used yet. It is not yet added to the DOM and therefore it has no parents, hence why you get undefined.
If you want to get information about the element's parents in the calendar then you need to use eventAfterRender (https://fullcalendar.io/docs/event_rendering/eventAfterRender/) instead. The documentation for this callback says:

Triggered after an event has been placed on the calendar in its final position.

This will work (this is not using Angular's wrapper, but you can just adjust the syntax appropriately, it should work exactly the same way):
eventAfterRender: function(event, element, view) {
  element.addClass(event.title);
  let parent = element.parent();
  console.log(parent.prop("colspan"));
}

See http://jsfiddle.net/9kLjhb6s/1/ for a demo.
Note that getting the "colspan" property specifically only works in "month" view, because the other view types don't use a table-based layout in the same way. But the principle is there if you want to get any other parent properties in those views.

