PHP code example of webbuilders-group / silverstripe-gridfield-calendar-view

1. Go to this page and download the library: Download webbuilders-group/silverstripe-gridfield-calendar-view library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webbuilders-group / silverstripe-gridfield-calendar-view example snippets


$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'
    ));