Skip to content Skip to sidebar Skip to footer

Fullcalendar Event Click Vs Link Inside The Event

I have a question. Maybe this is not possible but I was hoping for clarification. Fullcalendar right now has it so if there is a url inside the event, the whole event is clickable

Solution 1:

Did you try the example from fullcalendar docs?

$('#calendar').fullCalendar({
  events: [{
    title: 'My Event',
    start: '2017-01-13',
    url: 'http://google.com/'
  }],
  eventClick: function(event) {
    if (event.url) {
      //if you want to open url in the same tab
      location.href = "https://example.com";
      //if you want to open url in another window / tab, use the commented code below//window.open(event.url);returnfalse;
    }
  }
});

I don't know how do you render the link in your events, but this should do what you need.

Post a Comment for "Fullcalendar Event Click Vs Link Inside The Event"