我的全日历的默认视图是月份,我也想从月更改视图 议程按钮上的按钮外部按钮单击。 我想知道有任何内置函数可以在单击按钮时更改它。
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultDate: '2014-06-12',
defaultView: 'month',
editable: true,
events: [
{
title: 'All Day Event',
start: '2014-06-01'
},
{
title: 'Long Event',
start: '2014-06-07',
end: '2014-06-10'
},
{
id: 999,
title: 'Repeating Event',
start: '2014-06-09T16:00:00'
},
{
id: 999,
title: 'Repeating Event',
start: '2014-06-16T16:00:00'
},
{
title: 'Meeting',
start: '2014-06-12T10:30:00',
end: '2014-06-12T12:30:00'
},
{
title: 'Lunch',
start: '2014-06-12T12:00:00'
},
{
title: 'Birthday Party',
start: '2014-06-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2014-06-28'
}
]
});
});
http://fullcalendar.io/docs/views/changeView/
$('#calendar').fullCalendar( 'changeView', 'agendaDay');
在
脚本中添加此代码。它将默认视图从月更改为议程日。
defaultView: 'agendaDay'