# How to Create Events by Dragging in the Avonni Calendar

## Introduction

The Avonni Calendar allows users to create events easily by dragging them on the calendar. This guide will walk you through the basics of this feature.

## Step-by-step guide

* **Drag the Avonni Calendar to Your Screen Flow:** Add the Avonni Calendar component to your desired Screen Flow in Salesforce.
* **Access Component Settings:** Open the Component Builder to view and modify all settings related to the Avonni Calendar.

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

* **Set Up Interactions:**
  * Navigate to the 'Interactions' tab within the Component Builder.
  * Select the "Add a new event drag" option to enable the interaction for event creation through dragging.

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

* **Configure Interaction Details:**
  * Choose the 'Type of Interaction'. For instance, if you want users to create a new event during the drag-to-create action, opt for the 'Navigate' interaction type.
  * Define the 'Page Reference Type', selecting 'Object page'.
  * Specify the target object for new event creation. In this example, choose the 'Events' object.

<figure><img src="/files/5fVzihUwamAuqnBAh5eE" alt=""><figcaption></figcaption></figure>

* **Define Pre-filled Values:**
  * Assign pre-filled values to guide the Avonni Calendar in correlating the start and end times of the new event with the corresponding fields in Salesforce.

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

{% hint style="info" %}
This guide uses the Event object to demonstrate creating a new event using the Start and End Date Times on the Calendar. You can customize this process by choosing different objects or pre-filled values according to your requirements.
{% endhint %}

**Complete the Setup:** You've successfully configured the drag-to-create event feature on the Avonni Calendar with these steps.

You're now ready to streamline event creation in your Salesforce environment!


---

# 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-create-events-by-dragging-in-the-avonni-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.
