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
| id | string \| number | Yes | Unique identifier for the event. |
78
+
| description | string \| null | No | Descriptive text about the event. |
79
+
| startDate | Date | Yes | The starting date and time of the event. |
80
+
| endDate | Date | Yes | The ending date and time of the event. |
81
+
| color | string | No | Color used to represent the event visually. (CSS color name or hex value) |
82
82
83
+
::: tip
84
+
The color property will have no affect when implementing a custom [CalendarEvent Slot](#calendarevent-slot). In this case, the property can be used however you like: CSS color name, hex value, class name, etc.
85
+
:::
83
86
84
87
## Events
85
88
| Event Name | Payload | Purpose |
@@ -89,15 +92,15 @@ Currently both 'stack' and 'split' modes are a WIP, but decent enough to work wi
89
92
| event-updated | CalendarEvent | Emitted when an existing event is updated. |
90
93
91
94
::: info
92
-
Event calendar will allow the user to draw out a new event that is populated with a unique id, and the appropriate start and end dates. However it does nothing with this info other than emit the event-created event, this is where you would want to process what should actually happen.
95
+
Event calendar will allow the user to draw out a new event that is populated with a unique id, and the appropriate start and end dates. However it does nothing with this info other than emit the `event-created` event, this is where you would want to process what should actually happen.
93
96
94
97
Examples would be: validate or manipulate the incoming payload, and push directly to the events prop, or another array if the events prop is a computed buffer.
95
98
:::
96
99
97
100
## Slots
98
-
One of the main goals is to provide as much custom styling as possible, and where possible, slots are preferred over custom classes.
101
+
One of the main goals is to open up as much custom styling as possible, and for now where possible, exposing slots are leaned towards over providing custom classes.
99
102
100
-
### CalendarEvent
103
+
### CalendarEvent Slot
101
104
102
105
| Props | Prop Type |
103
106
| ----- | ------------- |
@@ -120,11 +123,20 @@ One of the main goals is to provide as much custom styling as possible, and wher
120
123
::: tip
121
124
When using this slot, it's better to avoid handling click events on the root element, in favor of the `event-clicked` event, as EventCalendar needs to consume click events and may end up in odd/unexpected behavior. As long as nested elements stop propagation, they should be safe to implement them.
122
125
:::
123
-
::: warning SIZING
124
-
When using this slot, you will (in almost all cases) want to set the width and height to 100% either in a class or inline style, to fill the entire space that the event takes up on the calendar.
126
+
127
+
::: info SIZING
128
+
When using this slot, your root element will automatically receive the following:
129
+
```
130
+
box-sizing: border-box
131
+
overflow: hidden
132
+
width: 100% (of value determined by concurrencyMode)
133
+
height: 100% (of height calculated by difference in minutes)
134
+
```
135
+
136
+
You are free to override these, but take special care.
125
137
:::
126
138
127
-
### DayHeader
139
+
### DayHeader Slot
128
140
This slot is the header above each day column.
129
141
130
142
| Props | Prop Type |
@@ -140,7 +152,7 @@ This slot is the header above each day column.
140
152
</template>
141
153
```
142
154
143
-
### TimeInterval
155
+
### TimeInterval Slot
144
156
The time display for each horizontal hour line. These will be centered vertically with each hour line.
0 commit comments