Skip to content

Commit 8b264dd

Browse files
authored
Merge pull request #408 from Antra/calendar-custom-event-symbol-class-docs
docs: document custom event symbol class
2 parents ed96dde + 176bd10 commit 8b264dd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/calendar.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ To use this module, add it to the modules array in the `config/config.js` file:
2424

2525
The following properties can be configured:
2626

27+
<!-- prettier-ignore -->
2728
| Option | Description |
2829
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2930
| `maximumEntries` | The maximum number of events shown. / **Possible values:** `0` - `100` <br> **Default value:** `10` |
@@ -61,7 +62,7 @@ The following properties can be configured:
6162
| `broadcastPastEvents` | If set to true, past events will be included in the `CALENDAR_EVENTS` broadcast to other modules. Use `pastDaysCount` to control how many days in the past are included. This does **not** affect the calendar display itself — past events are never shown in the calendar module. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false` |
6263
| `sliceMultiDayEvents` | If this is set to true, events exceeding at least one midnight will be sliced into separate events including a counter like (1/2). This is especially helpful in "dateheaders" mode. Events will be sliced at midnight, end time for all events but the last will be 23:59 <br> **Default value:** `false` |
6364
| `nextDaysRelative` | If this is set to true, the **FULL DAY** appointments of today and tomorrow are displayed relatively, even if the timeformat is set to absolute. <br> **Default value:** `false` |
64-
| `customEvents` | An array of `keyword`/`symbol`/`color`/`transform` that will customize events based on keyword in title. <br> <br> `keyword` is a case-insensitive string that if present in event title will trigger the use of custom symbol and/or color for that event,<br>`symbol` is the Font Awesome icon to use as symbol and<br> `color` is the CSS color to use for the event.<br>`transform` is an object for regular expression text replacement of the calendar title consisting of the following elements:<br>- `search` regular expression to search for<br>- `replace` replace string, may contain group match references<br>- `yearmatchgroup` (optional) the regex match group of a year that you want to replace to the current age<br><br>`keyword` and at least one of `symbol`, `color`, `transform` is required. <br> <br> **Examples:** <br>`customEvents: [{keyword: 'Birthday', symbol: 'birthday-cake', color: 'Gold'}]`<br><br>`customEvents: [{keyword: 'Geburtstag', symbol: 'birthday-cake', color: 'Gold', transform: { search: '^([^\']*) \'(\\d{4})$' , replace: '$1 ($2.)', yearmatchgroup: 2}},{keyword: 'in Hamburg', transform: { search: ' in Hamburg$' , replace: ''}} ]`<br>Will transform<br>![before](./screenshots/customEvents_transform_before.png)<br>to<br>![after](./screenshots/customEvents_transform_after.png) |
65+
| `customEvents` | An array of `keyword`/`symbol`/`symbolClassName`/`color`/`transform` that will customize events based on keyword in title. <br> <br> `keyword` is a case-insensitive string that if present in event title will trigger the use of custom symbol and/or color for that event,<br>`symbol` is the Font Awesome icon to use as symbol,<br>`symbolClassName` is the Font Awesome style prefix + family prefix to use for the symbol. If specified, it overrides the calendar-level `symbolClassName` for the matching event,<br>`color` is the CSS color to use for the event.<br>`transform` is an object for regular expression text replacement of the calendar title consisting of the following elements:<br>- `search` regular expression to search for<br>- `replace` replace string, may contain group match references<br>- `yearmatchgroup` (optional) the regex match group of a year that you want to replace to the current age<br><br>`keyword` and at least one of `symbol`, `color`, `transform` is required. <br> <br> **Examples:** <br>`customEvents: [{keyword: 'Birthday', symbol: 'birthday-cake', color:'Gold'}]`<br><br>`customEvents: [{keyword: 'Tesla', symbol: 'tesla', symbolClassName: 'fab fa-fw fa-', color: 'Blue'}]`<br><br>`customEvents: [{keyword: 'Geburtstag', symbol: 'birthday-cake', color: 'Gold', transform: { search: '^([^\']*) \'(\\d{4})$' , replace: '$1 ($2.)', yearmatchgroup: 2}},{keyword: 'in Hamburg', transform: { search: ' in Hamburg$' , replace: ''}} ]`<br>Will transform<br>![before](./screenshots/customEvents_transform_before.png)<br>to<br>![after](./screenshots/customEvents_transform_after.png) |
6566
| `limitDays` | If this property is set to a value greater than zero, the number of unique days displayed will be limited to `limitDays` days. <br><br> **Default value:** `0` (no limit) |
6667
| `limitDaysNeverSkip` | If this property is set to true, every event for every day will be shown regardless of if the day on has a single full day event or not.<br><br> **Default value:** `false` |
6768
| `flipDateHeaderTitle` | This property determines if the title for the date header in the `dateheaders` time format will align to the left or right. <br><br> **Possible values:** `true` (right) or `false` (left) <br> **Default value:** `false` (left) |

0 commit comments

Comments
 (0)