jQuery 完整日历默认视图设置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9562475/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jQuery Full Calendar Default View Setting
提问by Rajbir Singh
I am using jQuery Full calendar.
我正在使用 jQuery 完整日历。
But I am not getting how to set the week view as Default view in full calendar.
但我不知道如何在完整日历中将周视图设置为默认视图。
回答by Sudhir Bastakoti
Try:
尝试:
$('#calendar').fullCalendar({
defaultView: 'basicWeek'
aspectRatio: 1.5
});
Ref: FullCalendar Available Views
Edited:
编辑:
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
defaultView: 'basicWeek'
....
回答by Didier Ghys
Use the defaultView
option:
使用defaultView
选项:
$('#myCalendar'-.fullcalendar({
defaultView: 'basicWeek'
})
回答by lin
To get a calendar with a view of the week and hours:
要获取包含周和小时视图的日历:
$('#calendar').fullCalendar({
defaultView: 'agendaWeek'
});
回答by ManiMuthuPandi
Try this agendaWeek
试试这个议程周
$('#calendar').fullCalendar({
theme: true,
header: {
left: 'prev,today,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultView: 'agendaWeek',
.....
})
回答by wastetime909
As for Version 4, use
对于第 4 版,请使用
defaultView: 'timeGridWeek',
or
或者
defaultView: 'dayGridWeek',
reference: https://fullcalendar.io/docs/defaultView