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/overview.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,8 @@ Users can [create, edit and delete Scheduler appointments](slug:scheduler-appoin
107
107
108
108
## Recurrence
109
109
110
-
The Scheduler can display and edit [recurring appointments and recurrence exceptions](slug:scheduler-recurrence).
110
+
The Scheduler can display and edit [recurring appointments and recurrence exceptions](slug:scheduler-recurrence). Telerik UI for Blazor also provides standalone [recurrence editor components](slug:scheduler-recurrence#recurrence-editor-components) that you can use to edit recurrence rules in a custom edit form.
Copy file name to clipboardExpand all lines: components/scheduler/recurrence.md
+202Lines changed: 202 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -220,6 +220,208 @@ A single Scheduler data item defines one series of recurring appointments. Set t
220
220
}
221
221
````
222
222
223
+
## Recurrence Editor Components
224
+
225
+
Telerik UI for Blazor provides standalone components that you can use to edit recurring appointments outside the Scheduler or in a [custom Scheduler popup edit form](slug:scheduler-kb-custom-edit-form).
226
+
227
+
The Telerik Blazor recurrence editor components include:
|`RecurrenceFrequencyEditor`| Button Group | Defines whether the appointment repeats daily, weekly, monthly, yearly, or never. |
234
+
|`RecurrenceIntervalEditor`| Numeric TextBox | Defines whether the appointment repeats in each period (for example, every day), or skips periods (for example, once in three days). |
235
+
|`RecurrenceEditor`| Button Group or Radio Group | <ul><li>For weekly frequency, the Recurrence Editor is a Button Group with multiple selection, which allows choosing week days.</li><li>For monthly and yearly frequency, the Recurrence Editor is a combination for DropDownLists and a Numeric TextBox, which allow selecting repetition on specific days or week days.</li></ul> |
236
+
|`RecurrenceEndEditor`| Radio Group, Numeric TextBox, Date Picker | Defines if the appointment repeats indefinitely, a number of times, or until a specific date. |
237
+
238
+
### Parameters
239
+
240
+
All recurrence editor components expose:
241
+
242
+
* A `Rule` parameter of type `Telerik.Recurrence.RecurrenceRule` that supports two-way binding.
243
+
* A `RuleChanged` event that receives a `RecurrenceRule` argument.
244
+
* A `Class` parameter for [styling customizations](slug:themes-override).
245
+
246
+
In addition:
247
+
248
+
* The `RecurrenceIntervalEditor` supports an `Id` parameter of type `string`. Use it to set a custom `id` attribute to the Numeric TextBox and the same `for` attribute to the associated **Repeat every** label.
249
+
* The `RecurrenceEndEditor` supports an `End` parameter of type `DateTime`. Use it to set a default value for the **End On** Date Picker when there is no `UNTIL` setting in the recurrence rule string.
250
+
251
+
### Recurrence Rule Type Conversion
252
+
253
+
Use the following methods to convert from [RFC5545 strings](https://tools.ietf.org/html/rfc5545#section-3.3.10) to `RecurrenceRule` objects and vice-versa:
254
+
255
+
* The static method `RecurrenceRule.Parse()` to convert from RFC5545 `string` to `RecurrenceRule`.
256
+
* The instance method `RecurrenceRule.ToString()` to convert from `RecurrenceRule` to a RFC5545 `string`.
257
+
258
+
>caption Converting between different recurrence rule formats
There are two recommended ways to use the Telerik recurrence editors in a Telerik Form:
276
+
277
+
* Place each recurrence editor in a separate [Form item `Template`](slug:form-formitems-template). This is the simpler option to set up.
278
+
* Place all recurrence editors in a [`<FormItemsTemplate>`](slug:form-formitems-formitemstemplate). This is a more verbose approach, which provides better control over the Form's HTML rendering, layout and styling.
279
+
280
+
The following examples can serve as a reference for creating [custom Telerik Scheduler edit forms](slug:scheduler-kb-custom-edit-form) with recurrence editing. Using a markup structure that differs from the ones below may produce unexpected layouts.
281
+
282
+
>caption Using Telerik recurrence editors in separate Form item templates
public string Description { get; set; } = string.Empty;
370
+
371
+
public DateTime Start { get; set; }
372
+
public DateTime End { get; set; }
373
+
public bool IsAllDay { get; set; }
374
+
375
+
public string RecurrenceRule { get; set; } = string.Empty;
376
+
public List<DateTime>? RecurrenceExceptions { get; set; }
377
+
public Guid? RecurrenceId { get; set; }
378
+
379
+
public Appointment()
380
+
{
381
+
var rand = new Random();
382
+
Id = Guid.NewGuid();
383
+
}
384
+
}
385
+
}
386
+
````
387
+
388
+
To add the recurrence editors to a `FormItemsTemplate`, follow the same approach as in the example above, but add the following `<FormItemsTemplate>` tag as a child of `<TelerikForm>`.
389
+
390
+
>caption Using Telerik recurrence editors in a FormItemsTemplate
391
+
392
+
````RAZOR.skip-repl
393
+
<FormItemsTemplate Context="formContext">
394
+
@{
395
+
var formItems = formContext.Items.Cast<IFormItem>().ToList();
0 commit comments