@event-calendar/build 2.6.1 → 2.7.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 CHANGED
@@ -22,6 +22,7 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
22
22
  - [allDayContent](#alldaycontent)
23
23
  - [allDaySlot](#alldayslot)
24
24
  - [buttonText](#buttontext)
25
+ - [customButtons](#custombuttons)
25
26
  - [date](#date)
26
27
  - [dateClick](#dateclick)
27
28
  - [datesAboveResources](#datesaboveresources)
@@ -45,9 +46,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
45
46
  - [eventDidMount](#eventdidmount)
46
47
  - [eventDragMinDistance](#eventdragmindistance)
47
48
  - [eventDragStart](#eventdragstart)
48
- - [eventDragStop](#eventdragstop)
49
49
  </td><td>
50
50
 
51
+ - [eventDragStop](#eventdragstop)
51
52
  - [eventDrop](#eventdrop)
52
53
  - [eventDurationEditable](#eventdurationeditable)
53
54
  - [eventLongPressDelay](#eventlongpressdelay)
@@ -74,9 +75,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
74
75
  - [locale](#locale)
75
76
  - [longPressDelay](#longpressdelay)
76
77
  - [moreLinkContent](#morelinkcontent)
77
- - [noEventsClick](#noeventsclick)
78
78
  </td><td>
79
79
 
80
+ - [noEventsClick](#noeventsclick)
80
81
  - [noEventsContent](#noeventscontent)
81
82
  - [nowIndicator](#nowindicator)
82
83
  - [pointer](#pointer)
@@ -199,8 +200,8 @@ import '@event-calendar/core/index.css';
199
200
  ### Pre-built browser ready bundle
200
201
  Include the following lines of code in the `<head>` section of your page:
201
202
  ```html
202
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.6.1/event-calendar.min.css">
203
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.6.1/event-calendar.min.js"></script>
203
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.7.1/event-calendar.min.css">
204
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@2.7.1/event-calendar.min.js"></script>
204
205
  ```
205
206
 
206
207
  <details>
@@ -321,6 +322,54 @@ function (text) {
321
322
  </tr>
322
323
  </table>
323
324
 
325
+ ### customButtons
326
+ - Type `object`
327
+ - Default `undefined`
328
+
329
+ Defines custom buttons that can be used in the [headerToolbar](#headertoolbar).
330
+
331
+ First, specify the custom buttons as key-value pairs. Then reference them from the `headerToolbar` option.
332
+
333
+ <details>
334
+ <summary>Example</summary>
335
+
336
+ ```js
337
+ let options = {
338
+ customButtons: {
339
+ myCustomButton: {
340
+ text: 'custom!',
341
+ click: function() {
342
+ alert('clicked the custom button!');
343
+ }
344
+ }
345
+ },
346
+ headerToolbar: {
347
+ start: 'title myCustomButton',
348
+ center: '',
349
+ end: 'today prev,next'
350
+ }
351
+ };
352
+ ```
353
+ </details>
354
+
355
+ Each `customButton` entry accepts the following properties:
356
+ <table>
357
+ <tr>
358
+ <td>
359
+
360
+ `text `
361
+ </td>
362
+ <td>The text to be display on the button itself</td>
363
+ </tr>
364
+ <tr>
365
+ <td>
366
+
367
+ `click`
368
+ </td>
369
+ <td>A callback function that is called when the button is clicked. Accepts one argument <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent">mouseEvent</a></td>
370
+ </tr>
371
+ </table>
372
+
324
373
  ### date
325
374
  - Type `Date` or `string`
326
375
  - Default `new Date()`
@@ -1288,7 +1337,7 @@ This option is used instead of the `events` option.
1288
1337
  </td>
1289
1338
  <td>
1290
1339
 
1291
- A URL that the calendar will fetch [Event](#event-object) objects from. HTTP requests with the following parameters will be sent to this URL whenever the calendar needs new event data
1340
+ A URL that the calendar will fetch [Event](#event-object) objects from. HTTP requests with the following parameters will be sent to this URL whenever the calendar needs new event data:
1292
1341
  <table>
1293
1342
  <tr>
1294
1343
  <td>