FullCalendar只显示星期几

FullCalendar只显示星期几

本文介绍了FullCalendar只显示星期几的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我试图展示一周的时间表,我必须只显示日期的名称,没有日期。如议程视图中的时间表。
用户必须能够在一周中选择一个范围。
例如John Doe星期一从15:00到18:00,Martin星期五从9:00到15:00,等等......

  $('#calendar')。fullCalendar({
header:{
left:'',
center:'',
right:'',
},
editable:true,
views:{
settimana:{
type:'agendaweek',
duration:{days:7},
title:'Apertura',
}
},
defaultView:'settimana',
});

我该怎么做?调用jQuery fullCalendar插件时必须设置的选项是什么?



非常感谢。

解决方案

这只显示星期一至星期五

  $('#日历').fullCalendar({
header:{
left:'',
center:'',
right:'',
},
editable:true,
views:{
settimana:{
type:'agendaweek',
duration:{
days:7
},
title:'apertura',
columnFormat:'dddd',//将日期设置为只显示'Monday'
hiddenDays:[0,6] //隐藏星期日和星期六
}
},
defaultView:'settimana',
});

请参阅和


Hello guys I'm trying to show a week timetable, I must show only the name of the date, without date. Such as time table in agenda view.User must be able to select a range in day of the week.For example John Doe Monday from 15:00 to 18:00, Martin Friday from 9:00 to 15:00, and so...

I just try to create my personal view as "settimana" like this:

$('#calendar').fullCalendar({
   header: {
       left:'',
       center:'',
       right:'',
    },
    editable: true,
    views: {
        settimana:{
            type:'agendaWeek',
            duration: { days: 7 },
            title: 'Apertura',
        }
    },
    defaultView: 'settimana',
});

How can I do it? What I must set in option when calling jQuery fullCalendar plugin?

Thank you very much.

解决方案

This shows only Monday - Friday http://jsfiddle.net/w11xw5gt/1/

$('#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',
});

See Info for display options and text/time customization

这篇关于FullCalendar只显示星期几的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 12:09