cakephp and full calendar integration

i am new developer and i want to make an app in cakephp 3.7 thas uses jquery full calendar plugin for reservations.In my database is stored a specific date range (starting date and ending date fields).I want to use this date range in my calendar so that if a user clicks on a specific day on the callendar that is out of this date range, the app will display a messange informing the user that he cannot make a reservation for that day!

Any useful suggestions on who i will handle on this ?? Thank you!!

- - Source


answered 2 week ago Invincible #1

I have done it using the cakephp 3.6.

Generic steps that you would follow:

  1. You will include your full calendar js and jquery in the 'full calendar' template
  2. Then initialise your fullcalendar. Now you should see the calendar.
  3. Once done, from the fullcalendar make an ajax call to your controller to get the events. eg.

    var fcSources = {
        loadEvents: {
            url: //your controller action,
            type: "GET",
            cache: true,
            timezone: "Europe/London",
            className: "events",
            dataType: "json",
            success: function (data) {


Later part can be done by simply checking the date value against current date.

comments powered by Disqus