You have to solve two distinct problems:
- Implement logic (not visible to the user) that determines whether a requested booking is available or whether the villa is booked for some or all of the requested period.
- Implement some kind of visual display for the user to see when a villa is booked.
TCalendar would only help you with the second part, which is the least interesting (because you don't really need a visual interface, you could simply pop up a message that says "Villa Not Available").
To write the logic that will tell you whether a booking is available, you will need to refine your data model (or, if you've done that already, explain it to us in more detail). Specific questions you need to address are:
- Do you issue bookings against individual villas ("I want to book the Butterfly House for one week starting July 1") or against an inventory of identical villas ("I want to book one of your two-bedroom villas for one week starting July 1").
- You need to decide how you're going to store the booking information. When I've tried a task like this in the past, I've found it easiest to store a record for each night of each reservation then, for a request, do a separate query to determine if I can satisfy that individual night. A request for which I can satisfy all nights is bookable.