Ho开发者_Go百科w can i trigger clicking of the "today" button by code in FullCalendar? If I where to this by an external button?
http://arshaw.com/fullcalendar/docs/current_date/today/
You have access to fullCalendar, so you can do something like this:
$('#external-button').on('click', function() {
$('#calendar').fullCalendar('today');
});
Without actually looking at the code, I would assume that the "Today" button is hooked to a JQuery or Javascript method within the FullCalendar code. Just call that method.
In case the documentation URL posted above goes dead...
Moves the calendar to the current date.
.fullCalendar( 'today' )
Example using today with an external button:
$('#my-today-button').click(function() {
$('#calendar').fullCalendar('today');
});
精彩评论