> For the complete documentation index, see [llms.txt](https://ovatheme.gitbook.io/brw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ovatheme.gitbook.io/brw/brw-menu/booking-calendar.md).

# Booking Calendar

Go to: **BRW >> Booking Calendar**

**Two panels in one page:** The top half is the filterable calendar view. Below it is a separate **Check Available** panel for querying how many items are free in a given date range.

<figure><img src="/files/w6hhCNGpVU6CDrDuFjne" alt=""><figcaption></figcaption></figure>

### 1: Access & Permissions

The Booking Calendar is a WordPress admin submenu page registered under the BRW menu.

| Property               | Value                                        |
| ---------------------- | -------------------------------------------- |
| **Menu location**      | BRW → Booking Calendar (position 5)          |
| **Page slug**          | `ovabrw-booking-calendar`                    |
| **Minimum capability** | `edit_posts` (default)                       |
| **Capability filter**  | `ovabrw_submenu_booking_calendar_capability` |

{% hint style="warning" %}
Override the required capability with: `add_filter( 'ovabrw_submenu_booking_calendar_capability', function(){ return 'manage_options'; } );`
{% endhint %}

### 2: Filter Bar

A POST form above the calendar that lets you narrow events by product and/or location. On submit, the calendar reloads with only matching bookings.

<figure><img src="/files/O7NsiCkvt1ikUyCNBgPd" alt=""><figcaption></figcaption></figure>

**Product:** Select dropdown listing all BRW-enabled WooCommerce products. When left blank, events from all rental products are shown. Supports WPML multi-language: filtering by a product ID automatically includes all translated variants of that product.

**Pick-up Location:** Select dropdown populated from all pickup locations defined across all rental products. Filters events to only show bookings where pickup location matches the selected value.

**Drop-off Location:** Same as pickup location but filters on drop-off location order item meta.

### 3: Calendar Grid

Rendered by FullCalendar in dayGridMonth view. Events are colored bars spanning the booking date range.

<figure><img src="/files/yeR1j8JukG446c77mJOg" alt=""><figcaption></figcaption></figure>

### 4: Event Popup

Clicking a calendar event opens an inline popup showing full order and booking details.&#x20;

<figure><img src="/files/1Put7AqDpDaCu1JSRxv8" alt=""><figcaption></figcaption></figure>

### 5: Check Available

A separate AJAX-driven form below the calendar for checking how many rental units of a given product are available within a date range.

<figure><img src="/files/NaL7HwG1RCTPTgTSLUXv" alt=""><figcaption></figcaption></figure>

**Product -** <mark style="color:$danger;">Required</mark>

* Select dropdown of all BRW products. Must be selected before submitting

**Pick-up Location -** <mark style="color:$warning;">Conditional</mark>

* Only shown if the site has any pickup locations configured. Filters availability result to a specific location

**Drop-off Location -** <mark style="color:$warning;">Conditional</mark>

* Only shown if the site has any drop-off locations configured

**From Date / To Date -** <mark style="color:$danger;">Required</mark>

* DateTime pickers (with timepicker) using the same datepicker options as the booking form. Minimum date is today.

{% hint style="warning" %}
The result (number of available items) is displayed directly below the form, updated via AJAX on each filter submit.
{% endhint %}

### 6: PHP Filters

| Filter Hook                                         | Description                                                                                                                       |
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `ovabrw_booking_calendar_get_events`                | Modify the array of FullCalendar event objects. Args: `$events, $product_id, $pickup_location, $dropoff_location, $month, $year`. |
| `ovabrw_booking_calendar_get_booked_order_ids`      | Modify the list of order IDs fetched for the calendar. Args: `$order_ids, $product_id, $month, $year`.                            |
| `ovabrw_booking_calendar_get_date_range`            | Override the date window (default: prev month to next 2 months). Args: `$range, $month, $year`.                                   |
| `ovabrw_booking_calendar_get_html_popup_event_data` | Modify the HTML rendered in the event click popup. Args: `$html, $item, $order`.                                                  |
| `ovabrw_popup_event_show_total_details`             | Return `false` to hide subtotal/total section in the popup. Args: `$bool, $order`.                                                |
| `ovabrw_popup_event_hidden_order_itemmeta`          | Add/remove order item meta keys hidden from the popup. Default hidden list excludes internal WC meta.                             |
| `ovabrw_admin_datepicker_language`                  | Override calendar language string (e.g. `'vi'` for Vietnamese).                                                                   |
| `ovabrw_submenu_booking_calendar_capability`        | Change the required WordPress capability to view the Booking Calendar page. Default: `edit_posts`.                                |
| `ovabrw_sync_order_status`                          | Array of WC order statuses included in iCal/Google exports. Default: `['wc-processing']`.                                         |
| `ovabrw_ics_summary`                                | Customize the VEVENT SUMMARY field in .ics export.                                                                                |
| `ovabrw_ics_uid`                                    | Customize the VEVENT UID field in .ics export.                                                                                    |
| `ovabrw_ics_description`                            | Customize the VEVENT DESCRIPTION field in .ics export.                                                                            |
| `ovabrw_get_events_for_ical`                        | Modify the full VCALENDAR string before it is returned.                                                                           |
| `ovabrw_gcal_summary`                               | Customize the Google Calendar event title.                                                                                        |
| `ovabrw_gcal_description`                           | Customize the Google Calendar event description body.                                                                             |
| `ovabrw_gcal_description_customer_note`             | Customize how the customer note appears in the Google Calendar description.                                                       |
| `ovabrw_get_events_for_gcal`                        | Modify the full array of Google Calendar event objects before returning.                                                          |
| `brw_real_pickup_time_hotel`                        | Hotel check-in time used for calendar display. Default: `'14:00'`.                                                                |
| `brw_real_dropoff_time_hotel`                       | Hotel check-out time used for calendar display. Default: `'11:00'`.                                                               |
| `ovabrw_get_order_ids_between_dates`                | Modify order IDs used for iCal/Google sync date-range queries.                                                                    |
| `ovabrw_sync_calendar_hidden_order_itemmeta`        | Add/remove item meta keys hidden from Google Calendar event descriptions.                                                         |
