Today button disable for current month. when you go next or previous month it appear as active(when click on the TODAY button control goes to current month).
In following code I am showing how to make today button active for current month.
function makeTodaybtnActive()
{
$('#calendar button.fc-today-button').removeAttr('disabled');
$('#calendar button.fc-today-button').removeClass('fc-state-disabled');
}
(where #calendar is fullcalendar id)
call this function when calendar load
$(window).load(function() {
makeTodaybtnActive();
});
Also in eventRender
function
$('#calendar').fullCalendar({
eventRender: function(event, element) {
makeTodaybtnActive();
},
});
When calendar load (page load) that time first code work and when change the month and goes to current month (by clicking today button) then second code make Today button active.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…