Javascript 每个视图的完整日历选项

Javascript 每个视图的完整日历选项,javascript,jquery,fullcalendar,Javascript,Jquery,Fullcalendar,我对fullcalendar插件有点问题。 我想为多个视图设置不同的选项。 例如,我想在day视图中将slotDuration和defaultTimedEventDuration设置为30分钟,但在week视图中应设置为2小时 我怎样才能做到这一点?使用fullcalendar插件也可以吗?提前感谢。您可以使用fullcalendar网站上示例中的类似内容来完成此操作 $('#calendar').fullCalendar({ views: { basic: {

我对fullcalendar插件有点问题。 我想为多个视图设置不同的选项。 例如,我想在day视图中将slotDuration和defaultTimedEventDuration设置为30分钟,但在week视图中应设置为2小时

我怎样才能做到这一点?使用fullcalendar插件也可以吗?提前感谢。

您可以使用fullcalendar网站上示例中的类似内容来完成此操作

$('#calendar').fullCalendar({
    views: {
        basic: {
            // options apply to basicWeek and basicDay views
        },
        agenda: {
            // options apply to agendaWeek and agendaDay views
        },
        week: {
            // options apply to basicWeek and agendaWeek views
        },
        day: {
            // options apply to basicDay and agendaDay views
        }
    }
});

@谢谢你的帮助。slotDuration正在运行,defaultTimedEventDuration似乎无法根据每个视图定义

 views: {
      week: {
        defaultTimedEventDuration: '00:15:00',
        slotDuration: "00:30:00"
      },
      day: {
        defaultTimedEventDuration: '00:15:00',
        slotDuration: "00:15:00"
      },
      agendaDetailed: {
        type: 'agenda',
        buttonText: 'Detailed',
        defaultTimedEventDuration: '00:05:00',
        slotDuration: "00:05:00"
      }
    },