How can get start and end time on fullcalendar?

Viewed 55104

how can i get start and end time of visible days in fullcalendar?

I need it for use in another javascript instace. Is there some function like -

$('calender').getStartTime();

?

7 Answers

version 4

You can just use calendar object and get satrt/end dates

 var start = calendar.view.view.activeStart;
 var end = calendar.view.view.activeEnd;

Just posting it for others who might be looking for angular solution.

For start date this.calendar.getApi().view.activeStart and for end date this.calendar.getApi().view.activeEnd

You can follow https://fullcalendar.io/docs/angular to get fullcalendar api - getApi() to use above methods.

Related