webbuilders-group/silverstripe-gridfield-calendar-view

A component for viewing a GridField's data as a calendar

Installs: 5 662

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 5

Forks: 5

Open Issues: 2

Language:JavaScript

Type:silverstripe-vendormodule

3.0.0 2024-03-28 15:31 UTC

This package is auto-updated.

Last update: 2024-03-28 15:32:23 UTC


README

A component for viewing a GridField's data as a calendar, useful for things like event calendars. It also provides a toggle button that let's you switch between the default list view for a GridField and the Calendar view.

Maintainer Contact

Requirements

  • SilverStripe Framework 4.2+ | 5.0+

Installation

Composer (recommended):

composer require webbuilders-group/silverstripe-gridfield-calendar-view

If you prefer you may also install manually:

Quick Start

To get started you need to have an object that can be rendered as a item on a calendar. Then you need to add the GridFieldCalendarView component to your GridField's config. For example:

$myGridField=new GridField('Events', 'Events', $this->Events(), GridFieldConfig_RecordEditor::create(10));
$myGridField->getConfig()->addComponent(new GridFieldCalendarView(
        'StartDateTimeField', //This must be the name of the field in the model not a getter method
        'EndDateTimeField'
    ));

There are more options available, when adding the component for information on these see the documentation for more information.