javascript - Fullcalendar - 调整自定义时间的日历 View 日显示范围

标签 javascript jquery jquery-plugins fullcalendar

我正在构建一个应用程序,用于记录和显示凌晨 5 点至凌晨 5 点的每日事件。

我正在使用 Fullcalendar 在月 View 中显示这些事件。基于此,我需要将凌晨 5 点 - 凌晨 5 点显示为属于一天(例如星期一)。

例如,周一我有 3 个事件:

  1. 上午 7 点至上午 11 点
  2. 下午 1 点至凌晨 12:30(事件时间为周一和周二)
  3. 凌晨 1 点至凌晨 3 点(事件于周二有效;但是,我希望 周一显示)

理想情况下,我要添加一个参数 dayStartTime,它是维持 24 小时范围的自定义日开始时间偏移。

我的问题是 FullCalendar 插件中的哪些位置需要修改才能实现此结果?

最佳答案

试试这个 - http://fullcalendar.io/docs/utilities/Duration/

$('#calendar').fullCalendar({

header: {

    center: 'month,agendaFourDay' // buttons for switching between views
},
views: {
    agendaFourDay: {
        type: 'agenda',
        duration: { days: 4 },
        buttonText: '4 day'
    }
}
});

持续时间

"23:59"       // hours/minutes
"23:59:59"    // hours/minutes/seconds
"1.23:59:59"  // days/hours/minutes/seconds
{ days:1, hours:23, minutes:59 } // an object

关于javascript - Fullcalendar - 调整自定义时间的日历 View 日显示范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7211665/

相关文章:

javascript - 如何平移 THREE.PointCloud 对象中的顶点?

javascript - 正则表达式:不是一行的开头?

jQuery 在菜单上添加 .active 类

javascript - "setting a property that has only a getter"- Firefox 的 javascript 错误

javascript - 从1.3.2升级到1.8.3时jquery ajax成功

javascript - 无法运行 Vegas jQuery 插件

javascript - 从 JavaScript 中单击按钮打开新的浏览器选项卡

javascript - 是否可以操纵前端JS?

jquery - 使用 jQuery 在悬停/移出时展开/缩小 div

c# - 在 ASP .NET c# 中使用 JQuery 进行 Ajax