You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the package **does not** automatically add the `FullCalendarWidget` widget to your Filament panel, you are free to extend the widget and customise it yourself.
62
62
63
-
64
63
1. First, create a [Filament Widget](https://filamentadmin.com/docs/2.x/admin/dashboard#getting-started):
65
64
66
65
```bash
@@ -125,15 +124,19 @@ class CalendarWidget extends FullCalendarWidget
125
124
126
125
> Both methods should retun an array of [EventObject](https://fullcalendar.io/docs/event-object).
127
126
128
-
129
127
<br>
130
128
131
129
# Configuration
130
+
132
131
This is the contents of the default config file.
133
132
134
133
You can use any property that FullCalendar uses on its root object.
135
134
Please refer to: [FullCalendar Docs](https://fullcalendar.io/docs#toc) to see the available options. It supports most of them.
136
135
136
+
### Plugins
137
+
138
+
You can enable or disable plugins by setting the `plugins` property to `true` or `false`. By default, all non-standard plugins are disabled.
139
+
137
140
```php
138
141
<?php
139
142
@@ -148,6 +151,11 @@ return [
148
151
149
152
'locale' => config('app.locale'),
150
153
154
+
'plugins' => [
155
+
'rrule' => false,
156
+
'resourceTimeline' => false,
157
+
],
158
+
151
159
'headerToolbar' => [
152
160
'left' => 'prev,next today',
153
161
'center' => 'title',
@@ -236,19 +244,18 @@ Since [v1.0.0](https://github.com/saade/filament-fullcalendar/releases/tag/v1.0.
236
244
237
245
To customise the modal, override the following properties in your widget:
238
246
239
-
-`protected string $modalWidth`
240
-
-`protected string $modalLabel`
241
-
-`protected bool $modalSlideover`
247
+
-`protected string $modalWidth`
248
+
-`protected string $modalLabel`
249
+
-`protected bool $modalSlideover`
242
250
243
251
The process of saving and editing the event is up to you, since this plugin does not rely on a Model to save the calendar events.
244
252
245
-
246
253
## Creating Events
247
254
248
255
Events can be created in two ways.
249
256
250
-
- Clicking on a day (default)
251
-
- Selecting a date range (click and drag across calendar days) (you need to opt-in for this, set `selectable => true` in the config file.)
257
+
-Clicking on a day (default)
258
+
-Selecting a date range (click and drag across calendar days) (you need to opt-in for this, set `selectable => true` in the config file.)
252
259
253
260
This will open the Create Event modal.
254
261
@@ -278,21 +285,23 @@ protected static function getCreateEventFormSchema(): array
278
285
```
279
286
280
287
You can override the `getCreateEventModalTitle()` method to change the modal title to a custom one:
288
+
281
289
```php
282
-
public function getCreateEventModalTitle(): string
290
+
public function getCreateEventModalTitle(): string
You can override the `getCreateEventModalSubmitButtonLabel()` and `getCreateEventModalCloseButtonLabel()` methods to change the modal button labels to custom labels:
297
+
289
298
```php
290
-
public function getCreateEventModalSubmitButtonLabel(): string
299
+
public function getCreateEventModalSubmitButtonLabel(): string
You can override the `getEditEventModalSubmitButtonLabel()` and `getEditEventModalCloseButtonLabel()` methods to change the modal button labels to custom labels:
375
+
365
376
```php
366
-
public function getEditEventModalSubmitButtonLabel(): string
377
+
public function getEditEventModalSubmitButtonLabel(): string
0 commit comments