[FullCalendar] Get current month on a button click

[FullCalendar] Get current month on a button click

Forge Component
Published on 2013-10-15 by Joop Stringer
9 votes
Published on 2013-10-15 by Joop Stringer
Joop, I'm sorry for my little expertise (I'm a beginner)...

I have a reference to the FullCalendar component in my project, but how can I gather the current month/year by a button click, once I can't access the 'CalendarPlaceHolder' directly from my project?
Not sure what you want to achieve .. do you want the calendar to "jump" to a specific date by the push of a button somewhere on the screen ? If so ... just add a button, add a screen action like this

Just set the startdate and refresh the webblock et voila !
No, that's not what I want.

Let's suppose that the user have navigated to a specific month, via browser/javascript. I want to pass this month to the server-side so when I refresh the webblock, it will be at the same month.
Yeah that's what this does ... set the startDate parameter to the selected month/year and refresh the webblock.
That will trigger a renewed AJAX call to get the JSON data from the backend via the JSONurl in the webblock
JSONUrl? Where is it? Actually I don't understand how to get the JSON stuff working here.
I made this: On a button click, I pass some parameters to the server that triggers an SQL Query and refreshes the webblock. It's working perfectly. But still with a fixed 'startDate'.
Now I need 2 things, and this is flooding my mind...
1. I got to pass to the server the month/year presented in the current view together with other parameters as filters. So my screen action can refresh the webblock preserving the month/year that the user is seeing.
2. When the user navigate to the next or previous month, I need to refresh the Events List for the new month.
Have a look at the demopage.
On the left there is on the bottom the script to load data via JSON
Otherwise take a look at the following link http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/

The calendarblock automatically calls the JSON file whenever a user switches month/day/week
Check the CalendarJSON page in the OML
Joop! It worked perfectly! I took a look at the documentation of the jquery plugin and everything went fine.

I have made a few changes to the original project so I can pass other parameters to the FullCalendar component by a button click and by the events that trigger the AJAX to process.

Really thank you, and once I'm able to help improve the project, I'll do it.
Hi guys,
Is possible to get the Id of a click event and then pass as an input to a page?


Best Regards