Fullcalendar, required files for limit number events per day with view more/ more button?

一笑奈何 提交于 2019-12-07 11:39:09

问题


I am working in fullcalendar view functionlity. I am using ,

fullcalendar.css

fullcalendar.min.js.

My code is,

  $('#calendar').fullCalendar({
      header: {
      left: 'prev,next',
      center: 'title',
      right: 'month,basicWeek,basicDay'
      },
      editable: true,           
      events:curEvents
  });

Its working fine. But, if I pass more data into 'curevents' means, month view height goes to very long. So I like to add 'limit events' concept with 'viewmore/more' option/link to display data via popup box (or) when I click the 'viewmore' option it will redirect to day view. So I tried some code,

$('#calendar').limitEvents(4);

from help of below link =>

fullcalendar, how to limit the number of events per day in the month view

But height of the month view only aligned.View more button not yet displayed.So I want, name of the files for working this view more button functionality. If you give deep code explanation means, its more helpful for me. View more button not yet show and below code not limit the events also.

$('#calendar').limitEvents(4);

回答1:


Try the following.

With the new build v2.1.0-beta2 Launch 17 days ago Arshaw did the following

RESOLVED ISSUES:

  • Max events with "more..." link (304)
  • Don't fire eventMouseover/eventMouseout while dragging/resizing (1297)

NEW OPTIONS:

  • eventLimit
  • eventLimitClick
  • eventLimitText
  • dayPopoverFormat

Source

So, you can do the following:

$('#calendar').fullCalendar({
    lang: 'en',
    eventLimit: true, // If you set a number it will hide the itens
    eventLimitText: "Something" // Default is `more` (or "more" in the lang you pick in the option)
});


来源:https://stackoverflow.com/questions/20063699/fullcalendar-required-files-for-limit-number-events-per-day-with-view-more-mor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!