Skip to the article
Aniq-UI

HollinaAvailability and the calendar

Availability and the calendar

How the product decides which nights are free, how the website's calendar and the dashboard's calendar show them, blocked dates, holds and the company's time zone.

For the Full Stack package

Nights, not days

Every booking and every blocked range occupies the half-open interval [check-in, check-out): the check-in day is taken, the check-out day is free. A guest leaving on the 10th frees the 10th for the next arrival, and a three-night booking covers three nights.

  • One service in the API answers which nights are free, from the bookings that hold nights plus the blocked ranges. The website's calendar, the reserve card, the checkout, the dashboard's calendar and the AI assistant all ask it, so they cannot disagree.
  • Pending, confirmed, checked-in and completed bookings hold their nights. A cancelled booking holds nothing, so it never stands in the way of a new one.
  • Every date is a calendar day in the company's time zone, the timezone setting (America/New_York), written YYYY-MM-DD, never an instant. That is what "today" means for arrivals, the calendar, the cancellation window and the holds, on both sides of a daylight-saving change.

What a stay accepts

RefusalWhenThe API says
pastThe check-in day has gone"Choose a check-in date that has not passed."
min_nightsFewer nights than the stay's minimum"This stay has a minimum number of nights."
capacityMore guests than the stay sleeps"This stay does not sleep that many guests."
takenA booking or a block already holds one of the nights"Those nights are already taken."

The quote and the checkout check the same four, and the checkout checks them again when the booking is written, so two guests can never pay for the same night.

Holds

  • A card or PayPal booking holds its nights from the moment it is made, before the guest is sent to the processor, for 30 minutes. If the payment has not settled by then, a sweep running every minute cancels the booking and frees the nights.
  • A pay-on-arrival booking that waits for the host has no hold: it keeps its nights until the host confirms or cancels it.
  • A paid booking holds its nights until it is cancelled.

The calendar on the website

The stay page shows two months and marks five states, each with its own legend swatch:

StateMeaning
AvailableFree to choose
UnavailableIn the past, or a check-out that would fall inside the stay's minimum
TakenHeld by a booking or a block, struck through
SelectedThe chosen check-in and check-out
In rangeThe nights between them, in a lighter fill than a taken night

The reserve card beside it prices the chosen nights as soon as both days are picked.

The calendar in the dashboard

  • /en/dashboard/calendar shows a month of nights, one row per stay. A booking's bar covers its nights and stops before the check-out day, and opens the booking's details.
  • The blocked-dates dialog takes a stay's nights out of the calendar, from a first night to a check-out day, with a reason (Maintenance, Company use or Other) and an optional note. It is refused when a booking or another block already holds one of those nights, and the dialog names it: "Booking B0021 already holds some of these nights. Choose other dates.", or the same for a block such as K003.
  • The date fields keep the day you pick whatever time zone the computer is set to, so a block or a filter never lands on the day before.
  • Every block is listed below the calendar, soonest first, to edit or remove.
  • If a stay is also listed on another site, block the nights booked there by hand: the product has no channel manager and no iCal import or export.

Who can do what

PermissionAllows
calendar.viewSeeing the month and the blocks
calendar.blockAdding, changing and removing blocks

Both seeded roles, Super Admin and Manager, hold both.

The routes behind it

  • GET /api/stays/:slug/availability?from=&to= answers a published stay's taken nights for at most 92 days at a time, and GET /api/stays/:slug/quote?checkIn=&checkOut=&guests= its nights, subtotal, cleaning fee and total, with available and the refusal reason.
  • GET /api/calendar?month=YYYY-MM&stay= is the dashboard's month view.
  • /api/availability/blocks lists, adds (stay_id, from, to, optional reason and note), changes and removes blocks. A conflict answers 409 with code: "dates_taken", details: { "held_by": "booking", "reference": "B0021" } (or "block" and a K reference) and the translated message "Booking B0021 already holds some of these nights."

Stuck on a step?

Find a fix before you start over.

Troubleshooting

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising.