webbuilders-group/silverstripe-gridfield-calendar-view

一个将 GridField 的数据以日历形式查看的组件

安装次数: 5,672

依赖关系: 0

建议者: 0

安全性: 0

星标: 5

关注者: 6

分支: 5

开放问题: 2

语言:JavaScript

类型:silverstripe-vendormodule

3.1.0 2024-04-30 20:29 UTC

This package is auto-updated.

Last update: 2024-08-30 21:08:45 UTC


README

一个将 GridField 的数据以日历形式查看的组件,适用于事件日历等。它还提供了一个切换按钮,允许您在 GridField 的默认列表视图和日历视图之间切换。

维护者联系方式

要求

  • SilverStripe 框架 4.2+ | 5.0+

安装

Composer(推荐)

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

如果您愿意,也可以手动安装

快速入门

要开始,您需要一个可以渲染为日历项的对象。然后您需要将 GridFieldCalendarView 组件添加到 GridField 的配置中。例如

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

还有更多选项可供选择,有关这些选项的信息,请参阅 文档 以获取更多信息。