Class SfRecurrenceEditor
Recurrence Editor component to generate the recurrence rules and dates.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfRecurrenceEditor : SfBaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Examples
The following code example shows how to render a basic recurrence editor component based on the recurrence rule value.
<SfRecurrenceEditor Value="@RecurrenceValue">
</SfRecurrenceEditor>
@code {
string RecurrenceValue = "FREQ=DAILY;INTERVAL=2;COUNT=8";
}
Constructors
SfRecurrenceEditor()
Declaration
public SfRecurrenceEditor()
Properties
ChildContent
Gets or sets the child content of Recurrence editor.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type |
|---|
| RenderFragment |
CssClass
Gets or sets the custom classes to customize the recurrence editor component.
Declaration
[Parameter]
public string CssClass { get; set; }
Property Value
| Type | Description |
|---|---|
| string | If we set the css class, then the custom class is applied for recurrence editor element. The default value is |
Examples
<SfRecurrenceEditor CssClass="custom-editor"></SfRecurrenceEditor>
DateFormat
Gets or sets the user-specific date format on the recurrence editor.
Declaration
[Parameter]
public string DateFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string value. The default value is |
EnableRtl
Gets or sets whether the right-to-left direction is enabled for the recurrence editor component.
Declaration
[Parameter]
public bool EnableRtl { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | If set to |
EndTypes
Gets or sets the types that can be used to define the end condition for a recurrence editor.
Declaration
[Parameter]
public List<EndType> EndTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<EndType> | A collection of EndType objects representing the possible recurrence end types that can be applied to the pattern. By default, all available end types are used. |
Remarks
The recurrence end type determines when the recurrence pattern ends, such as never, after a certain number of occurrences, or on a specific date. This property allows the user to select the desired end type(s) from a list of available options.
FirstDayOfWeek
Gets or sets the first day of the week.
Declaration
[Parameter]
public int FirstDayOfWeek { get; set; }
Property Value
| Type | Description |
|---|---|
| int | If the |
Frequencies
Gets or sets the recurrence pattern on the editor.
Declaration
[Parameter]
public List<RepeatType> Frequencies { get; set; }
Property Value
| Type | Description |
|---|---|
| List<RepeatType> | A collection of RepeatType will be applied, By default all frequencies of the RepeatType are used. |
MaxDate
Gets or sets the maximum date that can be selected in the editor.
Declaration
[Parameter]
public DateTime MaxDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | The default value is |
Remarks
The Until date cannot be selected beyond the MaxDate.
MinDate
Gets or sets the minimum date that can be selected in the editor.
Declaration
[Parameter]
public DateTime MinDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | The default value is |
Remarks
The Until date cannot be selected before the MinDate.
SelectedType
Gets or sets the current repeat type on the recurrence editor.
Declaration
[Parameter]
public RepeatType SelectedType { get; set; }
Property Value
| Type | Description |
|---|---|
| RepeatType | One of the RepeatType enumeration. The default value is None. |
StartDate
Gets or sets the start date on the recurrence editor.
Declaration
[Parameter]
public DateTime StartDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | The default value is |
Value
Gets or sets the recurrence rule value.
Declaration
[Parameter]
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The default value is |
ValueChanged
Invoked when the recurrence value changes.
Declaration
[Parameter]
public EventCallback<string> ValueChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<string> |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
GetRecurrenceDates(DateTime, string, string, int?, DateTime?)
Gets the summary of the recurrence rule.
Declaration
public List<DateTime> GetRecurrenceDates(DateTime startDate, string rule, string excludeDate = null, int? maximumCount = null, DateTime? viewDate = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | startDate | Specifies the start date of the rule. |
| string | rule | Recurrence rule. |
| string | excludeDate | Specifies the date to be excluded. |
| int? | maximumCount | Specifies the maximum number of occurrences. |
| DateTime? | viewDate | Specifies the current view date. |
Returns
| Type | Description |
|---|---|
| List<DateTime> | The date of occurrences for the specified rule. |
GetRecurrenceRule()
To get the recurrence rule.
Declaration
public string GetRecurrenceRule()
Returns
| Type | Description |
|---|---|
| string | The current recurrence rule in the recurrence editor. |
GetRuleSummary(string)
Gets the summary of the recurrence rule.
Declaration
public string GetRuleSummary(string recurrenceRule)
Parameters
| Type | Name | Description |
|---|---|---|
| string | recurrenceRule | Recurrence rule. |
Returns
| Type | Description |
|---|---|
| string | The summary of the recurrence rule in the recurrence editor. |
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type |
|---|
| Task |
Overrides
SetRecurrenceRule(string, DateTime?)
Sets the recurrence rule.
Declaration
public void SetRecurrenceRule(string rule, DateTime? startDate = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | rule | Recurrence rule which needs to set in the recurrence editor. |
| DateTime? | startDate | Specifies the start date of the recurrence. |
UpdateRuleUntilDate(DateTime)
Sets the end date in the recurrence rule.
Declaration
public void UpdateRuleUntilDate(DateTime endDate)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | endDate | Specifies the until date. |