如何在完整日历中添加日期过滤器,例如:转到2017-12-15?
我希望用户选择特定日期来显示相关事件。
有可能吗?
答案 0 :(得分:0)
首先,使用任何支持的选项初始化fullcalendar。接下来,使用您选择的触发器调用gotoDate
方法。在此示例中,触发器将是一个按钮单击。
<强> HTML 强>
<div id="my_calendar"></div>
<button id="my_button">Go to 2017-12-15</button>
<强> JS 强>
$(function(){
$('#my_calendar').fullCalendar({
// your options here...
});
$('#my_button').click(function(){
// call fullCalendar 'gotoDate' method
$('#my_calendar').fullCalendar('gotoDate', '2017-12-15');
});
});