[FullCalendar 2] Calendar date range change

Forge Component
Published on 29 Mar (3 weeks ago) by Daniel Filipe
23 votes
Published on 29 Mar (3 weeks ago) by Daniel Filipe
How would I go about capturing when a user changes the calendars date range. For example they click the previous or next buttons or they change to Month/Week/Day views. I would need to know when this happens in Outsystems to requery for my events that I put on the calendar. Also when the page initially loads, how can I get the calendars date range so I can use it to query for calendar events in my database?

Hi Cody,

If you check the FullCalendarSample eSpace, I have defined a REST endpoint specifically for that purpose. The FullCalendar API manages which calendar events it needs according to the view that is being represented, so if you define the EventsRESTUrl with your REST endpoint ("/FullCalendarSample/rest/SampleJSON/GetEvents" in the sample eSpace), the API will call it with the parameters start and end filled out.

This is also valid for the initial page load.

Using this technique, you don't need to set data on the preparation, you just have to trust your REST endpoint will provide it.

Do let me know if this works for you.

Kind Regards,
João Grazina
Oh fantastic, that sounds great! Sorry it wasn't intuitively obvious to me when I was looking at the sample app. I will definilty give this a try and let you know how it ends up working out for me. Thank you for the fast response! Also this calendar component will be an important part of our application, so I'm hoping it will continue to be supported in the future. If you need any help with implementing new features and keeping it up to date I'm more than willing to help out, just let me know, thanks!
Sure Cody,

My team also heavily relies on this component, and as it has frequent support on the js libraries, we are also aiming to iteratively increase the feature list of this wrapper component (although the JSON strategy will take care of most differences).

If you have changes you want to push through, let me know and we'll evaluate inclusion.


Sounds great! Thanks again!