在Fullcalendar日视图中显示超过1天 [英] Show more than 1 day in Fullcalendar Day View

查看:555
本文介绍了在Fullcalendar日视图中显示超过1天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用完整日历组件在议程日视图中显示3天,或者最终使用垂直资源视图。



我尝试使用示例自定义视图,但没有运气。



我可以在日视图中显示3天,一个在另一个下方吗?



构造函数,但我不希望这些日子彼此相邻,而是彼此相邻。

$('#calendar')。fullCalendar({defaultView:'agendaDay ',defaultDate:'2017-12-07',editable:true,selectable:true,eventLimit:true,//当事件过多时允许更多链接header:{left:'prev,next today',center:' title,'right:'agendaDay,agendaTwoDay,agendaWeek,month'},views:{agendaTwoDay:{type:'agenda',duration:{days:3},//超过一天的观看次数不会执行此行为默认//所以,我们需要明确地启用它// groupByResource:true ////取消注释这一行在第一天使用groupByDate下的资源进行分组:}}

解决方案

为了在日程安排视图(天)中显示多天,只需添加 - 并+需要多少小时...例如-24 H为前一天,+ 24 H为选定日期后的一天。像这样:

  views:{

firstView:{
type:'agendaDay ',
minTime:'-12:00:00',
maxTime:'36:00:00',
slotDuration:'00:30:00',
} ,

}


I am trying to use the Full Calendar component to show 3 days in agenda Day view or eventually using the vertical resource view.

I tried using the example custom view but no luck.

Is it possible to show 3 days, one below another in the day view ?

I am using this constructor, but I don't want the days to be next to each other, but underneath each other.

$('#calendar').fullCalendar({
      defaultView: 'agendaDay',
      defaultDate: '2017-12-07',
      editable: true,
      selectable: true,
      eventLimit: true, // allow "more" link when too many events
      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'agendaDay,agendaTwoDay,agendaWeek,month'
      },
      views: {
        agendaTwoDay: {
          type: 'agenda',
          duration: { days: 3 },

          // views that are more than a day will NOT do this behavior by default
          // so, we need to explicitly enable it
          //groupByResource: true

          //// uncomment this line to group by day FIRST with resources underneath
          groupByDate: true
        }
      }

解决方案

In order to show multiple days in Agenda View ( Day ) just add - and + how many hours you want ... For example -24 H for a day ahead and +24 H for a day after your selected day. Something like this:

  views: {

    firstView: {
      type: 'agendaDay',
      minTime: '-12:00:00',
    maxTime: '36:00:00',
    slotDuration: '00:30:00',
            },

  }

这篇关于在Fullcalendar日视图中显示超过1天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆