> 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="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-5e9e97a961541fecfbf21d459d6e7a6865d1b754%2F2024-01-24_21-23-03%20(1).png?alt=media" 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="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-7175ea6ea5dfe1f031355bd218adc5c7adb9bb05%2F2024-01-24_21-24-38.png?alt=media" 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="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-7175ea6ea5dfe1f031355bd218adc5c7adb9bb05%2F2024-01-24_21-24-38.png?alt=media" 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="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-250ec84e42e0f1490467ccce3c591326c209a44d%2F2024-01-24_21-26-47.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
