How can I call the Today button by code?

How can I call the Today button on the code in FullCalendar? If I where to it with the help of an external button?

+4
source share
4 answers

You have access to fullCalendar, so you can do something like this:

$('#external-button').on('click', function() { $('#calendar').fullCalendar('today'); }); 
+6
source

Without looking at the code, I would suggest that the Today button is connected to a JQuery or Javascript method in FullCalendar code. Just call this method.

0
source

If the documentation url published above does not work ...

Move calendar to current date.

 .fullCalendar( 'today' ) 

Example use today with an external button:

 $('#my-today-button').click(function() { $('#calendar').fullCalendar('today'); }); 
0
source

Source: https://habr.com/ru/post/1344763/


All Articles