如何更改fullcalendar上的默认视图点击
我的fullcalendar的默认视图是月份我想更改从月的视图too agendaDay on按钮外部按钮单击。我想知道有任何inbuild函数可以在点击按钮时进行更改。如何更改fullcalendar上的默认视图点击
$('#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'
以上是 如何更改fullcalendar上的默认视图点击 的全部内容, 来源链接: utcz.com/qa/263964.html