Kerby82
Kerby82

Reputation: 5146

Fullcalendar eventLimit not using popover

I'm using fullcalendar with eventLimit.

I don't want to use the popover function of eventLimit, I would like just to show the remaining events in the same view.

I'm using the basicWeek but if I set:

elementClick: 'basicWeek'

Clicking on the more link does not work at all.

Please see the example at the following link

Upvotes: 0

Views: 1296

Answers (1)

ADyson
ADyson

Reputation: 61784

I think you mean:

eventLimitClick: "basicWeek"

not "elementClick".

https://fullcalendar.io/docs/display/eventLimitClick/

There's no "elementClick" option in the documentation, as far as I can see.

EDIT:

In your JSFiddle I can see you have used "eventLimitClick" correctly. However, you're asking it to go to the same view ("basicWeek") that you're already in, which will essentially do nothing.

Did you mean to make it go to, say, the "basicDay" view to get more detail? If so, then in order to make it work, you then need to override the "eventLimit" for the day view in question, so that you don't simply end up with the "show more" type link on that view instead of the actual events. To do that, you need to update the fullCalendar and momentJS versions you're using in the Fiddle, so that fullCalendar supports view-specific options (see https://fullcalendar.io/docs/views/View-Specific-Options/).

In short, what you'd need to do is set the options like this:

eventLimit: 1,
eventLimitClick: 'basicDay', //go to a DAY view, not the same week view
views: { 
  basicDay: { eventLimit: false } //for the day view, remove the event limit
},

See a working fiddle: http://fiddle.jshell.net/pwyw2sfy/3/

Upvotes: 0

Related Questions