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
Copy file name to clipboardExpand all lines: components/scheduler/events.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -951,19 +951,20 @@ The handler receives an argument of type `SchedulerCellRenderEventArgs` which ex
951
951
| Field | Type | Description |
952
952
| --- | --- | --- |
953
953
|`Class`|`string`| The CSS class that will be applied to the cell. |
954
-
|`Date`|`DateTime`| The date that is associated with the cell. |
955
954
| `IsAllDay` | `bool` | Whether the slot is inside the `AllDay` row/column.
956
955
|`Resources`|`List<KeyValuePair<string, object>`| The resources that are associated with the column/row. Applicable when the Scheduler uses both - [resources]({%slug scheduler-resources%}) and [grouping]({%slug scheduler-resource-grouping%}). Needed to differentiate between the same dates within different groups. |
957
-
|`SlotStartTime`|`DateTime`| The slot start time. The date is 1/1/1900, but the essential part is the time portion. |
958
-
|`SlotEndTime`|`DateTime`| The slot end time. The date is 1/1/1900, but the essential part is the time portion. |
956
+
|`Start`|`DateTime`| The slot start time. |
957
+
|`End`|`DateTime`| The slot end time. |
959
958
959
+
>caption Customize certain Scheduler slots by handling the `OnCellRender` event
960
960
961
961
````CSHTML
962
962
<style>
963
963
.lunch-break {
964
964
background-color: rgba(255,124,115,0.3);
965
+
pointer-events:none;
965
966
}
966
-
967
+
967
968
.lunch-break::after {
968
969
content: "Lunch break";
969
970
}
@@ -995,8 +996,9 @@ The handler receives an argument of type `SchedulerCellRenderEventArgs` which ex
995
996
DateTime lunchStart = new DateTime(1900, 1, 1, 12, 0, 0);
996
997
DateTime lunchEnd = new DateTime(1900, 1, 1, 12, 30, 0);
997
998
998
-
if ((args.SlotStartTime.Equals(lunchStart) || args.SlotEndTime.Equals(lunchEnd)) &&
0 commit comments