【问题标题】:want to display week and day only in fullcalendar plugin只想在全日历插件中显示星期和日期
【发布时间】:2013-04-06 08:44:03
【问题描述】:

我正在开发 jquery fullcalendar 插件。默认情况下,此插件显示整周和一周。但是,我只想显示星期和日期。我为此更改了选项,以便当用户加载页面时,它应该自动加载周历,但它仍然加载月份,并且要查看周用户必须单击周选项卡才能看到它。 如何更改此默认行为,以便用户在加载网站时看到周历?

$('#calendar').fullCalendar({
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'agendaWeek,agendaDay',
        ignoreTimezone: false
    },
    selectable: true,
    selectHelper: true,
    editable: true,
    events: 'events'
});

【问题讨论】:

    标签: javascript jquery


    【解决方案1】:

    只需将defaultView: 'basicWeek' 添加到您的完整日历选项中:

    $('#calendar').fullCalendar({
        defaultView: 'basicWeek'
    });
    

    查看documentation

    Demo

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多