How to get current display date range in fullscreen jquery

I applied fullcalendar in my application. I ran into a problem getting the current date range. I want the date range displayed to appear in the full calendar. Please offer me the right solution.

For example, look at this image. enter image description here

In this I want to get "September 20" and "September 26."

+6
source share
2 answers

Try it.

Add this function and call it. This will help you.

function GetCalendarDateRange() { var calendar = $('#calendar').fullCalendar('getCalendar'); var view = calendar.view; var start = view.start._d; var end = view.end._d; var dates = { start: start, end: end }; return dates; } 
+17
source
 $('#mycalendar').fullCalendar('getView').start.format('DD MMM'); $('#mycalendar').fullCalendar('getView').end.format('DD MMM'); 
+2
source

All Articles