> For the complete documentation index, see [llms.txt](https://docs.gridmate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridmate.io/package-reference/components-library/calendars-and-timelines/gm-single-calendar.md).

# GM - Single Calendar

(gmpkg:calendarAnyViewLWC)

## **Documentation**

The **Single Calendar** component enables users to easily manage and view schedules in one place. It features drag-and-drop support, conditional coloring, and filtering by criteria, making calendar management more efficient and visually engaging.

**Use case:** Setting up a calendar to visualize project tasks efficiently. See [**Single Calendar**](https://docs.gridmate.io/product-tour/calendars-and-timelines/single-calendar.md).

## **Specification**

<table data-full-width="true"><thead><tr><th width="265.40625">Property</th><th width="194.8724365234375">Type</th><th width="367.1259765625">Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Calendar Label</td><td>String</td><td>Set the label of the calendar.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the calendar icon. All lightning icons are supported.</td></tr><tr><td>Default Calendar View</td><td>String</td><td>Set the default view (daily|weekly|monthly|agenda). The default value is weekly.</td></tr><tr><td>Day Start Hour</td><td>Integer</td><td>First hour shown in daily/weekly views (0-23). Hours before this are skipped. Use 0 for full day. The default value is 0.</td></tr><tr><td>Day End Hour</td><td>Integer</td><td>Last hour shown in daily/weekly views (1-24). Hours from this onward are skipped. Use 24 for full day. The default value is 24.</td></tr><tr><td>Calendar Height</td><td>Integer</td><td>Set the calendar height. Use 9999 for dynamic height.</td></tr><tr><td>Activity Object</td><td>String</td><td>Activity Object API Name. Don’t forget __c for custom objects.</td></tr><tr><td>Activity Title Field</td><td>String</td><td>Activity Title Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Sub Title Field</td><td>String</td><td>Activity Sub Title Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Date Field</td><td>String</td><td>Activity Date Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity From Date Field</td><td>String</td><td>Activity From Date Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity To Date Field</td><td>String</td><td>Activity To Date Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Popover Fields</td><td>String</td><td>Activity Popover Fields to display. Keep it empty to use the compact layout.</td></tr><tr><td>Activity Popover Columns #</td><td>Integer</td><td>Activity Popover Columns #</td></tr><tr><td>Activity Filter</td><td>String</td><td>Activity Filter. The filter should be a JSON string.</td></tr><tr><td>Activity Default Values</td><td>String</td><td>JSON string to initialize a new activity created from the calendar. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Coloring</td><td>String</td><td>Activity Coloring. The coloring should be a JSON string. A rule's <code>color</code> accepts <code>$record.FieldApiName</code> to use the colour stored on the record.</td></tr><tr><td>Activity Actions</td><td>String</td><td>JSON string to initialize the list of available actions for an activity.</td></tr><tr><td>Activity Icon</td><td>String</td><td>Activity Icon.</td></tr><tr><td>Activity Label</td><td>String</td><td>Activity Label.</td></tr><tr><td>Enable Create Activity</td><td>Boolean</td><td>Check this option if you want to create activities.</td></tr><tr><td>Enable Update Activity</td><td>Boolean</td><td>Check this option if you want to update activities.</td></tr><tr><td>Enable Delete Activity</td><td>Boolean</td><td>Check this option if you want to delete activities.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>Boolean</td><td>Check this option if you want to enable toggle fullscreen.</td></tr><tr><td>Extra Activities</td><td>String</td><td>Extra Activities Config.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="calendarAnyViewLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>65.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <masterLabel>GM - Single Calendar</masterLabel>

    <targetConfigs>
        <targetConfig
            targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage,lightningCommunity__Default"
        >
            <property
                name="recordId"
                type="String"
                label="recordId"
                description="recordId to use. Keep this empty if you want to use the current record"
            />

            <!-- UI props-->
            <property
                name="customLabel"
                type="String"
                label="Calendar Label"
                description="Set the label of the calendar."
            />
            <property
                name="customIcon"
                type="String"
                label="Custom Icon"
                description="Customize the calendar icon. All lightning icons are supported"
            />
            <property
                name="defaultTimelineView"
                type="String"
                label="Default Calendar View"
                description="Set the default view (daily|weekly|monthly)"
            />
            <property
                name="dayStartHour"
                type="Integer"
                label="Day Start Hour"
                description="First hour shown in daily/weekly views (0-23). Hours before this are skipped. Use 0 for full day."
            />
            <property
                name="dayEndHour"
                type="Integer"
                label="Day End Hour"
                description="Last hour shown in daily/weekly views (1-24). Hours from this onward are skipped. Use 24 for full day."
            />
            <property
                name="height"
                type="Integer"
                label="Calendar Height"
                description="Set the calendar height. Use 9999 for dynamic height"
            />

            <!-- Activity props-->
            <property
                name="objectName"
                type="String"
                label="Activity Object"
                description="Activity Object API Name. Don’t forget __c for custom objects"
            />
            <property
                name="titleFieldName"
                type="String"
                label="Activity Title Field"
                description="Activity Title Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="subTitleFieldName"
                type="String"
                label="Activity Sub Title Field"
                description="Activity Sub Title Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="dateFieldName"
                type="String"
                label="Activity Date Field"
                description="Activity Date Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="fromDateFieldName"
                type="String"
                label="Activity From Date Field"
                description="Activity From Date Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="toDateFieldName"
                type="String"
                label="Activity To Date Field"
                description="Activity To Date Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="popoverFields"
                type="String"
                label="Activity Popover Fields"
                description="Activity Popover Fields to display. Keep it empty to use the compact layout"
            />
            <property
                name="popoverColums"
                type="Integer"
                label="Activity Popover Columns #"
                description="Activity Popover Columns #"
            />
            <property
                name="filter"
                type="String"
                label="Activity Filter"
                description="Activity Filter. The filter should be a JSON string"
            />
            <property
                name="defaultValues"
                type="String"
                label="Activity Default Values"
                description="Json string to initialize a new activity created from the calendar. Don’t forget __c for custom fields"
            />
            <property
                name="coloring"
                type="String"
                label="Activity Coloring"
                description="Activity Coloring. The coloring should be a JSON string"
            />
            <property
                name="actions"
                type="String"
                label="Activity Actions"
                description="Json string to initialize the list of available actions for an activity"
            />
            <property name="recordIcon" type="String" label="Activity Icon" description="Activity Icon" />
            <property name="recordLabel" type="String" label="Activity Label" description="Activity Label" />

            <!-- Permissions props-->
            <property
                name="canCreate"
                type="Boolean"
                label="Enable Create Activity"
                description="Check this option if you want to create activities"
            />
            <property
                name="canUpdate"
                type="Boolean"
                label="Enable Update Activity"
                description="Check this option if you want to update activities"
            />
            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete Activity"
                description="Check this option if you want to delete activities"
            />

            <property
                name="canToggleFullscreen"
                type="Boolean"
                label="Enable Toggle Fullscreen"
                description="Check this option if you want to enable toggle fullscreen"
            />

            <!-- Extra Activities -->
            <property
                name="extraActivities"
                type="String"
                label="Extra Activities"
                description="Extra Activities Config"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
```

{% endtab %}
{% endtabs %}


---

# 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.gridmate.io/package-reference/components-library/calendars-and-timelines/gm-single-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.
