@event-calendar/build 1.4.1 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -9
- package/event-calendar.min.js +2 -2
- package/event-calendar.min.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
|
|
|
35
35
|
- [editable](#editable)
|
|
36
36
|
- [events](#events)
|
|
37
37
|
- [eventBackgroundColor](#eventbackgroundcolor)
|
|
38
|
+
- [eventClassNames](#eventclassnames)
|
|
38
39
|
- [eventClick](#eventclick)
|
|
39
40
|
- [eventColor](#eventcolor)
|
|
40
41
|
- [eventContent](#eventcontent)
|
|
@@ -193,8 +194,8 @@ import '@event-calendar/core/index.css';
|
|
|
193
194
|
### Pre-built browser ready bundle
|
|
194
195
|
Include the following lines of code in the `<head>` section of your page:
|
|
195
196
|
```html
|
|
196
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.
|
|
197
|
-
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.
|
|
197
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.5.1/event-calendar.min.css">
|
|
198
|
+
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@1.5.1/event-calendar.min.js"></script>
|
|
198
199
|
```
|
|
199
200
|
|
|
200
201
|
<details>
|
|
@@ -283,24 +284,35 @@ When hidden with `false`, all-day events will not be displayed in `timeGrid`/`re
|
|
|
283
284
|
|
|
284
285
|
### buttonText
|
|
285
286
|
- Type `object` or `function`
|
|
286
|
-
- Default `{
|
|
287
|
+
- Default `{close: 'Close', dayGridMonth: 'month', listDay: 'list', listMonth: 'list', listWeek: 'list', listYear: 'list', resourceTimeGridDay: 'day', resourceTimeGridWeek: 'week', timeGridDay: 'day', timeGridWeek: 'week', today: 'today'}`
|
|
288
|
+
> Views override the default value as follows:
|
|
289
|
+
> - dayGridMonth `function (text) { return {...text, next: 'Next month', prev: 'Previous month'}; }`
|
|
290
|
+
> - listDay `function (text) { return {...text, next: 'Next day', prev: 'Previous day'}; }`
|
|
291
|
+
> - listMonth `function (text) { return {...text, next: 'Next month', prev: 'Previous month'}; }`
|
|
292
|
+
> - listWeek `function (text) { return {...text, next: 'Next week', prev: 'Previous week'}; }`
|
|
293
|
+
> - listYear `function (text) { return {...text, next: 'Next year', prev: 'Previous year'}; }`
|
|
294
|
+
> - resourceTimeGridDay `function (text) { return {...text, next: 'Next day', prev: 'Previous day'}; }`
|
|
295
|
+
> - resourceTimeGridWeek `function (text) { return {...text, next: 'Next week', prev: 'Previous week'}; }`
|
|
296
|
+
> - timeGridDay `function (text) { return {...text, next: 'Next day', prev: 'Previous day'}; }`
|
|
297
|
+
> - timeGridWeek `function (text) { return {...text, next: 'Next week', prev: 'Previous week'}; }`
|
|
298
|
+
|
|
287
299
|
|
|
288
300
|
Text that is displayed in buttons of the header toolbar.
|
|
289
301
|
|
|
290
|
-
This value can be either a plain object with all necessary properties, or a callback function that receives default button
|
|
302
|
+
This value can be either a plain object with all necessary properties, or a callback function that receives default button text object and should return a new one:
|
|
291
303
|
|
|
292
304
|
```js
|
|
293
|
-
function (
|
|
294
|
-
// return new button
|
|
305
|
+
function (text) {
|
|
306
|
+
// return new button text object
|
|
295
307
|
}
|
|
296
308
|
```
|
|
297
309
|
<table>
|
|
298
310
|
<tr>
|
|
299
311
|
<td>
|
|
300
312
|
|
|
301
|
-
`
|
|
313
|
+
`text`
|
|
302
314
|
</td>
|
|
303
|
-
<td>An object with default button
|
|
315
|
+
<td>An object with default button text</td>
|
|
304
316
|
</tr>
|
|
305
317
|
</table>
|
|
306
318
|
|
|
@@ -542,6 +554,43 @@ Sets the default background color for events on the calendar.
|
|
|
542
554
|
|
|
543
555
|
You can use any of the CSS color formats such `'#f00'`, `'#ff0000'`, `'rgb(255,0,0)'`, or `'red'`.
|
|
544
556
|
|
|
557
|
+
### eventClassNames
|
|
558
|
+
- Type `string`, `array` or `function`
|
|
559
|
+
- Default `undefined`
|
|
560
|
+
|
|
561
|
+
Sets additional CSS classes for events.
|
|
562
|
+
|
|
563
|
+
This value can be either a string containing class names `'class-1 class-2 ...'`, an array of strings `['class-1', 'class-2', ...]` or a function that returns any of the above formats:
|
|
564
|
+
|
|
565
|
+
```js
|
|
566
|
+
function (info) {
|
|
567
|
+
// return string or array
|
|
568
|
+
}
|
|
569
|
+
```
|
|
570
|
+
`info` is an object with the following properties:
|
|
571
|
+
<table>
|
|
572
|
+
<tr>
|
|
573
|
+
<td>
|
|
574
|
+
|
|
575
|
+
`event`
|
|
576
|
+
</td>
|
|
577
|
+
<td>
|
|
578
|
+
|
|
579
|
+
The associated [Event](#event-object) object
|
|
580
|
+
</td>
|
|
581
|
+
</tr>
|
|
582
|
+
<tr>
|
|
583
|
+
<td>
|
|
584
|
+
|
|
585
|
+
`view`
|
|
586
|
+
</td>
|
|
587
|
+
<td>
|
|
588
|
+
|
|
589
|
+
The current [View](#view-object) object
|
|
590
|
+
</td>
|
|
591
|
+
</tr>
|
|
592
|
+
</table>
|
|
593
|
+
|
|
545
594
|
### eventClick
|
|
546
595
|
- Type `function`
|
|
547
596
|
- Default `undefined`
|
|
@@ -596,7 +645,7 @@ The current [View](#view-object) object
|
|
|
596
645
|
This is currently an alias for the `eventBackgroundColor`.
|
|
597
646
|
|
|
598
647
|
### eventContent
|
|
599
|
-
- Type `string`, `object`or `function`
|
|
648
|
+
- Type `string`, `object` or `function`
|
|
600
649
|
- Default `undefined`
|
|
601
650
|
|
|
602
651
|
Defines the content that is rendered inside an event’s element.
|