# Week Daily Availability Group

## Overview

![](https://1633175017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSxXQuy9qhgrmawSEYdMH%2Fuploads%2FzpMdI9HoqFRSMwSAjSK3%2Fweek1.png?alt=media\&token=93af3d58-7dd7-4b02-b520-062944397b7a)

This block shows the availability of each day of one week at a time and allows the user to toggle left and right between weeks. Ideal for booking / Airbnb-type applications where you need to show a calendar for availabilities.

## Structure

* When this block is added to a page, it has a reusable element inside called **weeklyavailability**.This reusable element contains all of the logic and UI for the block.
  * The dates are displayed based on the variable **var - week start day** (of data type `date`) in **Popup Hidden Variables**
    * When the page is first loaded, the `Current date/time` is passed to **var - week start day**&#x20;
    * Clicking on **Group Main previous** and **Group Main next** would pass a different start day (minus or plus 7 days to `Current date/time`) to **var - week start day**<br>
* Other reusable on this page includes:
  * [**filters\_template**](https://docs.airdev.co/canvas-pages-and-modules/v/3.0.0/reusables/applyfilters) (hidden by default in the title group)

## How to set up

* Open the **weeklyavailability** reusable
* Open **Popup Hidden Variables**. \
  This popup contains two group variables that are used in the week daily availability widget. For more information on how to use **Popup Hidden Variables**, [click here](https://docs.airdev.co/canvas/canvas-functionality/data-and-workflows#using-the-hidden-variables-popup).
  * **var - Website object** stores the app's `website object`. It is used in **Group Main previous** and **Group Main next** to pull the website's primary color.
  * **var - week start day** stores the week's start day date&#x20;
* \[OPTIONAL] Modify the data source of `var - start day` to include any filters you need
* Update the placeholder conditionals on **Text AVAILABLE?** elements

![](https://1633175017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSxXQuy9qhgrmawSEYdMH%2Fuploads%2FEVShTR0vGNCOgwnOyxIb%2Fweek2.png?alt=media\&token=64007d33-4d53-45d3-833f-a10da1a5b989)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.airdev.co/canvas/4.2/canvas-library/blocks/week-daily-availability-group.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
