我希望能够在日历的标题上添加一行按钮,以显示一年中的月份,并在单击时将您带到月份视图中的该月份。
我尝试过并未能使用视图添加此内容。在此示例中,我希望日历跳至一月:
views: {
january: {
type: 'month',
duration: { months: 1 },
start : '2016-01-01',
end: '2016-01-31',
buttonText: 'January'
}
},
任何想法吗?有一个更好的方法吗?
谢谢!
试试这个..
页面加载时,这将在右侧添加按钮。将其写在ready函数中。
$('.fc-right').find('.fc-button-group').after("<input type='button' value='january' onclick='gotoJan();'");
然后在函数里面。
function gotoJan() {
$('#calendar').fullCalendar( 'gotoDate', '2014-01-01');
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句