# addCalendarEventSource

## Parameters

1. controlId - The id of the calendar control
2. eventSource - the Event source object

## Example Usages

```javascript
   app.addCalendarEventSource("myCal", {
      events: [
         {
            title: 'Sammple Event 1',
            start: '2020-12-08',
         },
         {
            title: 'Sammple Event 2',
            start: '2020-12-10',
         },
      ],
      id: 1,
      color: 'yellow',   // an option!
      textColor: 'black' // an option!
   });
```

Where **events** is an array that contains two event objects, each representing a calendar event. These event objects have properties like **title** and **start**. **id** can be used as a distinguishing parameter.

### Return Values

Function does not explicitly produce return value.


---

# 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://gebra-it.gitbook.io/wiki/client-api-reference/functions/addcalendareventsource.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.
