# Calendar

## Definitions

* **Event**: An event in a calendar view is analogous to a row as define [here](/docs/documentation/software-contributions/architecture/frontend/database-view.md#database-definitions), with the added requirement of it must having at least one date field.

## Layout Settings

Several aspects of the calendar view UI can be customized in the settings menu. These settings are stored in the database's layout settings:

* Which layout to use: day, week or month.
* Whether to display weekends.
* Whether to display the week numbers.
* Which day is the first day of the week.
* Which date field should be used to arrange the events in the calendar.

The calendar layout settings are retrieved by [sending events](/docs/documentation/software-contributions/architecture/frontend/database-view.md#events-and-notifications) to the backend and then getting the resulting notification. The specific events and notifications of interest here are the `GetLayoutSetting` and `SetLayoutSetting` events, and the `DidUpdateLayoutSettings` and `DidSetNewLayoutField` notifications.

## Displaying Events

Events in the database are arranged in the calendar using the currently-specified date field. If the value of this date field for an event is empty, that event will not be displayed in the calendar, but rather in a list of other such events.


---

# 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.appflowy.io/docs/documentation/software-contributions/architecture/frontend/database-view/calendar.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.
