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/calendar/events.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,13 +165,15 @@ When the user selects a range from the calendar, the first click always fires th
165
165
166
166
## CellRender
167
167
168
-
The `CellRender` event fires when each cell in each view is about to render. It allows you to see which view it is in, what its date, and you can set the `Class`for the `<td>` element based on your business logic.
168
+
The `CellRender` event fires when each cell in each view is about to render. The event allows you to find out the current view and cell date. You can also set a custom CSS class for the `<td>` element.
169
169
170
170
The event arguments are of type `CalendarCellRenderEventArgs` and provide the following fields:
171
171
172
-
*`Date` - `DateTime` - the date of the cell
173
-
*`View` - `CalendarView` - the currently visible view. You can use it to determine if the calendar is rendering the MonthView, YearView, and so on.
174
-
*`Class` - `string` - lets you set a custom CSS class to the cell DOM element.
172
+
| Property | Type | Description |
173
+
| --- | --- | --- |
174
+
|`Class`|`string`| A custom CSS class for the cell DOM element. |
175
+
|`Date`|`DateTime`| The date of the cell |
176
+
|`View`|`CalendarView` enum <br /> (`Month`) | The currently visible view. You can use it to determine if the calendar is rendering the MonthView, YearView, and so on. |
175
177
176
178
You can also customize the cells through their [templates]({%slug calendar-templates-overview%}). You can use the event together with the templates.
177
179
@@ -206,9 +208,6 @@ Move between the calendar views to see the different behaviors in the Month and
206
208
background-color: purple;
207
209
color: yellow;
208
210
}
209
-
/* You can inspect the built-in rendering with the browser dev tools
210
-
to see how to apply heavier selectors and to also use classes the
211
-
calendar provides such as focus and selection states */
Copy file name to clipboardExpand all lines: components/datepicker/events.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ This article explains the events available in the Telerik DatePicker for Blazor:
17
17
*[OnOpen](#onopen)
18
18
*[OnClose](#onclose)
19
19
*[OnBlur](#onblur)
20
+
*[OnCalendarCellRender](#oncalendarcellrender)
20
21
21
22
## OnChange
22
23
@@ -213,6 +214,53 @@ The `OnBlur` event fires when the component loses focus.
213
214
}
214
215
````
215
216
217
+
## OnCalendarCellRender
218
+
219
+
The `OnCalendarCellRender` event fires when each calendar cell in each view is about to render. The event allows you to find out the current view and cell date. You can also set a custom CSS class for the `<td>` element.
220
+
221
+
The event handler receives as an argument an `DatePickerCalendarCellRenderEventArgs` object that contains:
222
+
223
+
| Property | Type | Description |
224
+
| --- | --- | --- |
225
+
|`Class`|`string`| A custom CSS class for the calendar cell DOM element. |
226
+
|`Date`|`DateTime`| The date of the calendar cell. |
227
+
|`View`|`CalendarView` enum <br /> (`Month`) | The currently visible view. You can use it to determine if the calendar is rendering the MonthView, YearView, and so on. |
228
+
229
+
>caption Handle the OnCalendarCellRender event.
230
+
231
+
````CSHTML
232
+
@* Customize the calendar cells using the OnCalendarCellRender event. *@
The `OnCalendarCellRender` event fires when each calendar cell in each view is about to render. The event allows you to find out the current view and cell date. You can also set a custom CSS class for the `<td>` element.
219
+
220
+
The event handler receives as an argument an `DateRangePickerCalendarCellRenderEventArgs` object that contains:
221
+
222
+
| Property | Type | Description |
223
+
| --- | --- | --- |
224
+
|`Class`|`string`| A custom CSS class for the calendar cell DOM element. |
225
+
|`Date`|`DateTime`| The date of the calendar cell. |
226
+
|`View`|`CalendarView` enum <br /> (`Month`) | The currently visible view. You can use it to determine if the calendar is rendering the MonthView, YearView, and so on. |
227
+
228
+
>caption Handle the OnCalendarCellRender event.
229
+
230
+
````CSHTML
231
+
@* Customize the calendar cells using the OnCalendarCellRender event. *@
Copy file name to clipboardExpand all lines: components/datetimepicker/events.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ This article explains the events available in the Telerik DateTimePicker for Bla
17
17
*[OnOpen](#onopen)
18
18
*[OnClose](#onclose)
19
19
*[OnBlur](#onblur)
20
+
*[OnCalendarCellRender](#oncalendarcellrender)
20
21
21
22
22
23
## OnChange
@@ -217,6 +218,52 @@ The `OnBlur` event fires when the component loses focus.
217
218
}
218
219
````
219
220
221
+
## OnCalendarCellRender
222
+
223
+
The `OnCalendarCellRender` event fires when each calendar cell in each view is about to render. The event allows you to find out the current view and cell date. You can also set a custom CSS class for the `<td>` element.
224
+
225
+
The event handler receives as an argument an `DateTimePickerCalendarCellRenderEventArgs` object that contains:
226
+
227
+
| Property | Type | Description |
228
+
| --- | --- | --- |
229
+
|`Class`|`string`| A custom CSS class for the calendar cell DOM element. |
230
+
|`Date`|`DateTime`| The date of the calendar cell. |
231
+
|`View`|`CalendarView` enum <br /> (`Month`) | The currently visible view. You can use it to determine if the calendar is rendering the MonthView, YearView, and so on. |
232
+
233
+
>caption Handle the OnCalendarCellRender event.
234
+
235
+
````CSHTML
236
+
@* Customize the calendar cells using the OnCalendarCellRender event. *@
0 commit comments