我想在调用函数显示日历时将初始月份设置为任意月份。
例如,用户在其他地方选择了去年 6 月(2011 年 6 月)的日期,我希望 fullcalendar 显示之前的 4 月(2010 年 4 月)。是的,这只是为了证明,没有意义;-))
我尝试先调用“gotodate”,然后再调用显示函数,但这似乎不起作用
$('#calendar').fullCalendar( 'gotoDate', currentdate);
$('#calendar').fullCalendar({
header: {left: 'prevYear,prev,today,next,nextYear',
center: 'title', right: 'month,basicWeek,basicDay' etc...}
有人最终可以提供一个如何正确执行此操作的示例吗?
原文由 Stefan 发布,翻译遵循 CC BY-SA 4.0 许可协议
你有它倒退。先显示日历,再调用
gotoDate
。