Changing-days

13 views
Skip to first unread message

agw

unread,
Mar 21, 2010, 1:12:45 PM3/21/10
to Ajax Availability Calendar
Hi.
I've just found this calendar and it seems almost perfect for using as
a part of my bookingsystem. But I have a problem. I need to be able to
set two half days at the same date.
Example:
A cabin is booked from 22-03-2010 to 24-03-2010 and the booking has
its own ID.
Then the same cabin is booked from 24-03-2010 to 26-03-2010 and gets
its own booking-id.
A booking always starts with a half day (pm) and ends with a half day
(am). But how can I make it so that I can start a new booking at the
same day as an other booking ends? I also wish to mark that day as
"Changing day" (the date that in this case should be found 2 times in
the database table).

cbolson

unread,
Mar 22, 2010, 5:51:28 AM3/22/10
to Ajax Availability Calendar
Hi there,
As you have probably realized, this calendar does not hold any actual
booking data other than the availabillty of the date (hence the
name ;) ) so what you are requiring is not possible with the script as
is. Do be able to add booking ids you would clearly need to modify
the code and, in doing so, adding the possibility to have distinct
booking ids on the same day should be possible.

As regards marking a day as "chageoverday" (I imagine you mean
regardless of it's actuall booking state) could be done either via php
by modifying the code that puts the calendar together or by
javascript. Doing it in php would probably be a better solution.

If you look at the "ac-includes" > "functions.inc.php" flle you should
see some code that detects the weekend days and adds the class
"weekend" to them like this:

// add weekend class - used in javascript to alter class or set
opacity
if ($day_num % 7 == 1) $day_classes.=' weekend';
elseif ($day_num % 6 == 1) $day_classes.=' weekend';

You could copy those lines (you actually only need one of them) and
playaround with the numer (eg 5=saturday) and add an extra class to
the date such as "changeover".
Then, in the css, add this style and define it's border color or style
(don't use the background as this will be overwritten)

Let me know if you need anymore help with this .

Chris

Kirsty

unread,
Mar 23, 2010, 5:14:01 AM3/23/10
to Ajax Availability Calendar
As an availability calendar, if you have a booking for both half days
and you want to show that it is therefore fully booked, then you would
just change the state to a full day to reflect the 2 half days
together. :)

rcph

unread,
Mar 24, 2010, 3:17:51 AM3/24/10
to Ajax Availability Calendar
Reply all
Reply to author
Forward
0 new messages