HOW TO increase date range for availability calendar?

Talk and help info about common issues

Moderators: ne_moj, zewa

administrator
Site Admin
Site Admin
Posts: 5922
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO increase date range for availability calendar?

Postby administrator » Dec 3rd, '12, 16:45

Currently Hotel Site system and embedded calendar allows visitors to select booking date in the nearest 365 days (+/- 30).
For example, if today is Nov 04, 2012 a calendar will allow you to select maximum date Nov 30, 2013

If you want to change this date range you have to do following:
1. Open templates/{your template}/js/calendar.js file, find there

Code: Select all

for(n=0;n<=11;n++)
and replace 11 with a required number of months (for example - 23, if you want to allow booking in 2 year-period)

2. Open include/classes/Rooms.class.php file, find there DrawSearchAvailabilityBlock() method, find there

Code: Select all

for($i=0; $i<12; $i++){...}
and change 12 into required number of months.

These changes will allow you to enable selection dates for longer period of time.

Return to “ApPHP Hotel Site {HOW TO}”