【问题标题】:FullCalendar week view start on MondayFullCalendar 周视图从星期一开始
【发布时间】:2017-10-20 20:56:07
【问题描述】:

我想做类似这样的事情:show only weekdays,但是,我希望它从一周的第一天开始(或从周日到下周六显示)。

我尝试为一周的第一天(即星期日)的 startintervalStart 选项设置一个时刻,但这似乎不起作用。

编辑(来自上面的链接)

$('#calendar').fullCalendar({
    header: {
        left: '',
        center: '',
        right: '',
    },
    editable: true,
    views: {
        settimana: {
            type: 'agendaWeek',
            duration: {
                days: 7
            },
            title: 'Apertura',
            columnFormat: 'dddd', // Format the day to only show like 'Monday'
            hiddenDays: [0, 6] // Hide Sunday and Saturday?
        }
    },
    defaultView: 'settimana',
    });

【问题讨论】:

标签: jquery fullcalendar


【解决方案1】:

为了将来参考,对于自定义视图dateAlignment 选项可用于实现 weekdaysOnlyView 之类的内容。

【讨论】:

    【解决方案2】:

    我能够做到这一点:

    $('#calendar').fullCalendar({
        ...  
        // Added the default date
        defaultDate: $.fullCalendar.moment().startOf('week'),
        ...
        });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-14
      • 1970-01-01
      • 2012-11-27
      • 1970-01-01
      • 2023-03-30
      • 1970-01-01
      • 2013-09-23
      • 1970-01-01
      相关资源
      最近更新 更多