# How to Add an Edit Action to Events

## Overview

This tutorial guides you through setting up an "edit" action in the [Avonni Calendar](/flow/flow-components/calendar.md) component. Specifically, you'll learn how to enable editing for an event when you hover your mouse over it.

## 1️⃣ Step 1: Add a button on the event item

* Open the screen element on Flow Builder
* Select the Calendar Component and click the "**Open Component Builder**" button.
* Expand the "Context Menu Action"
* Click on the "Add Event" button

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

## 2️⃣ Step 2: Add a button label

* Type a label name for your button

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

## 3️⃣ Step 3: Create an interaction

* Click on the Interaction Tab
* Under the Action section, click on the "Add Event" button.

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

## 4️⃣ Step 4: Define the interaction

* For the **`Target Name`**, select the target name created in step 2
* For **`Type`**, select **Navigate**
* For **`Page Reference Type`**, select **Record Page**
* For **`Object API Name`**, select **Event** (or any other object based on your use case)
* For **`Record Id`**, select **Event: Name**
* For **`Action Name`**, select **Edit**
* Click **Save**

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

## 🫵 Final Result

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


---

# 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.avonnicomponents.com/flow/tutorials/components/calendar/how-to-add-an-edit-action-to-events.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.
