We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    Hi,

    I’m trying to implement a booking/availability calendar within a CMP (as part of a collection of CMP’s in a tabbed panel). I have a attached a screenshot of the prototype I assembled using two subclasses of MODx.Panel: a Calendar panel (wrapper panel for months) and a Month panel. The calendar should display booked and available dates for a number of rental properties. A property can be selected from the combo upon which the Calendar panel should re-render itself.

    After browsing through the ExtJs API I’m not sure how to move on with the prototype. My plan was to have a Month class (in PHP) which (1) is capable of retrieving bookings from the database and (2) is capable of rendering itself to HTML which can then be displayed inside each Month panel.

    How do I actually connect each Month panel to the Month class in PHP so that upon rendering the Calendar panel, each Month panel is rendered as well?

    Also, if you think this approach sucks feel free to say so (...and maybe add some pointers on how to do it right grin)

    Thanks for ideas, pointers, suggestions etc...
      MODx Revolution / MAMP / OS X
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      This is impressive; it’s in mootools and has been ported to jquery

      http://www.ajaxavailabilitycalendar.com/
      http://forum.ajaxavailabilitycalendar.com/viewtopic.php?f=22&p=1464#p1464
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 27519
        • 275 Posts
        Thanks for the link. Indeed, impressive.

        The only downside is that it’s not ExtJs and I need ExtJs...

        EDIT: Had a closer look at it. This calendar works separately from the booking process as far as I can tell. So, you make a booking and then go to the calendar admin and mark the booked dates. While that would work, I want a more integrated process where the calendar is always a reflection of the bookings in the database. Especially for an online booking service, this is a must. So, although a good piece of work not really suitable for my situation.
          MODx Revolution / MAMP / OS X