Availability Calendar

From Booking Automation Wiki
Jump to: navigation, search
Legacy Availability Calendar
This page explains how to create a legacy availability calendar for your website. 
{{#fas:exclamation-triangle}} These widgets are depreciated. Use the widget designer in {{#fas:cog}} (SETTINGS) BOOKING ENGINE > BOOKING WIDGETS to create widgets if you can.

Go to {{#fas:cog}} (SETTINGS) BOOKING ENGINE > BOOKING WIDGETS > BOOKING BUTTON and click on the link at the bottom.

Use the selector to define if the link should open your booking page displaying all properties (in case you have more than one), a property or a room.

Customization

You can customise defining:

  • text colour
  • text not in month colour -colour of dates that are not in the month on the availability calendar widget
  • background colour - if you don't want a fading effect, set both colours the same
  • available dates background color
  • available dates hover colour - mouse hover over background colour of available nights
  • unavailable dates background color
  • referrer text - If you use widgets on different websites you may use different referrers on each. This text will be recorded with any bookings originating from this widget allowing tracking of booking sources.

If you want to change the first day of the week, for example to Sunday, add the following to your page anywhere before the calendar code. The number can be between 0 and 7 where 0=Sunday, 1=Monday etc.

<script>var BookingAutomationCalStartDay=0;</script>


You can change the settings and click on SAVE. Click on GET CODE. Copy the code to where you want to display the widget in the websites source code. The settings will be stored. Once you have installed the widget and want to change colours you only need it to do here and the changes will appear automatically on your website.


If the widget does not fit into its designated place you can override the CSS padding for the buttons and make them smaller with the following CSS

.BookingAutomationavailcal input {padding:5px;}

Either add the above directly to your CSS or add the following to the HEAD section of your page, if necessary change the 5px to a better value.

Code: Select all
<style>
.BookingAutomationavailcal input {padding:5px;}
</style>

If you want to change the the style you can do this adding CSS to the stylesheet of your website. For example to change the font size add:

.BookingAutomationavailcal td{
font-size: 20px !important;
}

Multiple calendars on the same page (programming skills required)

The calendars have a clone function which allows showing multiple months, please see the source of this page for details

1. start with a normal availability calendar widget from the widgets menu

<div style="width:auto; padding:0; margin:0;"><form id='ap00002048' style='display:inline;' method='GET' target='_blank' action='https://www.BookingAutomation.com/booking.php'><script type='text/javascript' src='https://www.BookingAutomation.com/availcal/cal.jsp?propid=2048&width=200'></script><input type='hidden' name='propid' value='2048'><input type='hidden' name='fdate' value=><input type='hidden' name='referer' value='Calendar'><input id='BookingAutomationsub1411413312' type='submit' STYLE='width:200px' value='Check Availability' title='Click to check availability and make a reservation online'><script type='text/javascript'>document.getElementById('BookingAutomationsub1411413312').style.display='none';</script></form></div>


2. make a clone of the calendar

  • the form id must be unique, we add a letter
  • the cloned calendar is in an array, pass the id of the form to connect it to.
  • the array name is in the format cb00<propid>[] for property calendars and ca00<roomid> for room calendars.
  • we have removed the input button and the script to hide it.
<div style="width:auto; padding:0; margin:0;"><form id='ap00002048b' style='display:inline;' method='GET' target='_blank' action='https://manage.bookingautomation.com/booking.php'><script>cb00002048[1]=cb00002048[0].clone('ap00002048b');</script><input type='hidden' name='propid' value='2048'><input type='hidden' name='fdate' value=><input type='hidden' name='referer' value='Calendar'></form></div>

3. make another clone

<div style="width:auto; padding:0; margin:0;"><form id='ap00002048c' style='display:inline;' method='GET' target='_blank' action='https://manage.bookingautomation.com/booking.php'><script>cb00002048[2]=cb00002048[0].clone('ap00002048c');</script><input type='hidden' name='propid' value='2048'><input type='hidden' name='fdate' value=><input type='hidden' name='referer' value='Calendar'></form></div>

4. and as many more as you want

<div style="width:auto; padding:0; margin:0;"><form id='ap00002048d' style='display:inline;' method='GET' target='_blank' action='https://manage.bookingautomation.com/booking.php'>  <script>cb00002048[3]=cb00002048[0].clone('ap00002048d');</script><input type='hidden' name='propid' value='2048'><input type='hidden' name='fdate' value=><input type='hidden' name='referer' value='Calendar'></form></div>

5. this script which is included after the calendars are cloned increments the displayed date one month at a time

<script>
cb00002048[1].nextMonth();
cb00002048[2].nextMonth();
cb00002048[2].nextMonth();
cb00002048[3].nextMonth();
cb00002048[3].nextMonth();
cb00002048[3].nextMonth();
</script>