> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-create-events-by-dragging-in-the-avonni-calendar.md).

# 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/bnkhL06xLcmpUCE1dabc" 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/QFPosdwDXvgcXNiUAIHb" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-create-events-by-dragging-in-the-avonni-calendar.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
