-1
今天按鈕的今天按鈕開酥料餅在默認情況下禁用讓它先活動。(Fullcalendar, Make Today Button for current month active)Fullcalendar,當點擊當前日期
在下面的代碼我顯示如何打開當前日期的酥料餅當點擊今日按鈕。
在腳本文件中寫下面的代碼。
$(document).on('click', '.fc-today-button', function(){
$('#fc-more-'+moment().format('YYYY-MM-DD')).click();
});
修改Fullcaldar renderMoreLink(),在renderMoreLink下面添加行()
renderMoreLink: function(cell, hiddenSegs){
var custom = moment(cell.start).format('YYYY-MM-DD'); // custsom code
return $('<a class="fc-more" id="fc-more-'+custom+'"/>') added id in <a>
}