Page 1 of 1

HOW TO increase date range for availability calendar?

Posted: Dec 3rd, '12, 16:45
by administrator
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.