---
description: >-
  To ensure that you can get your events into the calendar correctly, start by
  making sure your database is setup to recieve events. All of the
  properties/fields below can be associated with an event.
---

# Set Up Your Event Database

## The Basics

To get events on the calendar, you at least need to have a title, start/end time, and unique ID. That means you can start by setting up your DB like this.&#x20;

{% embed url="https://vimeo.com/570111542" %}
The most basic DB setup you can go with ^^^^^
{% endembed %}

#### In addition to the above _created_ event properties, you'll also use the Uniqe ID created by the Bubble DB. Again, you dont need to do anything to have these created, Bubble takes care of this for you. You will, however, need to make sure to use this automagically created property when filling in event fields _while using the calendar element._&#x20;

![](https://1857871955-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdYYYaX6u6mOCBpjLIC%2F-MdbfzjCEwymI7pOtfOx%2F-Mdbh2gg_clcwQBaiOrS%2FScreen%20Shot%202021-07-02%20at%2010.48.15%20AM.png?alt=media\&token=24a07e8e-0e3e-41cd-94a2-ce7d66bb8d88)

## The Advanced

As your app becomes more complex, it is feasible to assume that you'll want to associate more and more data with events. Using the built-in Bubble Database, you could always click an event, get it's uniqe event ID, then go do a search and recall some data related to that event. OR, you could load that data into the calendar with the event itself. This makes the extra info immediately available and avoids the need for extra calls to the DB thus reducing overall server load. &#x20;

#### Other possible event properties

* Color `hex or RBG or RBA value`&#x20;
  * You may wish to assign discrete colors to events. Note this isn't required, just a nice-to-have feature.&#x20;
* Editability `Boolean value`
  * You won't always want events to be editable. This means that they can't simply be dragged and dropped or have their durations extended by click-and-dragging at the bottom of the event.
* Location `string value`&#x20;
  * realistically, this can be any text you want it to be. It is not limited to Location. But, if you tie into google, this value could become really handy as Google Events. This way you could make an event in your Bubble app. Open it in your Google Cal on your phone, and be navigated to the event via Google maps!
* Summary `string value`
  * realistically, this can be any text you want it to be. It is not limited to Summary
* Identifier `string value`
  * By assigning identifiers to events, you can use this identifier to control the color of events dynamically instead of by changing the event color in the database. You can then use that later.

![These settings can be found on the Calendar Element input Fields](https://1857871955-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdYYYaX6u6mOCBpjLIC%2F-Md_5FmJqcm1_i4T8P2M%2F-Mdbdgx0que8WvXyOC12%2FScreen%20Shot%202021-07-02%20at%2010.35.26%20AM.png?alt=media\&token=e7086f7a-be83-4a74-a8ae-3800d7e08649)



* Resource `string value`
  * This is a useful property to have when you are scheduling people, things, places, rooms, etc.&#x20;
* Extra Data 1 `string value`
  * This can be useful for any piece of information you would like to associate with the calendar
* Extra Data 2 `string value`
  * This can be useful for any piece of information you would like to associate with the calendar

### All properties&#x20;

![notice there is no explicit start/stop field. Instead I will use range in all examples. Be aware this is builders choice and will work either way](https://1857871955-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdYYYaX6u6mOCBpjLIC%2F-MdbfzjCEwymI7pOtfOx%2F-MdbjCn6LOEnLpg-I6_v%2FScreen%20Shot%202021-07-02%20at%2010.58.25%20AM.png?alt=media\&token=bbd4356e-1e56-4770-ba20-8a110367ccd8)

