Class SfRecurrenceEditor
Recurrence Editor component to generate the recurrence rules and dates.
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfRecurrenceEditor : SfBaseComponent
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
public RenderFragment ChildContent { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.RenderFragment |
CssClass
Gets or sets the custom classes to customize the recurrence editor component.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.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
public string DateFormat { get; set; }
Property Value
Type | Description |
---|---|
System.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
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If set to |
EndTypes
Gets or sets the types that can be used to define the end condition for a recurrence editor.
Declaration
public List<EndType> EndTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.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
public int FirstDayOfWeek { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | If the |
Frequencies
Gets or sets the recurrence pattern on the editor.
Declaration
public List<RepeatType> Frequencies { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.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
public DateTime MaxDate { get; set; }
Property Value
Type | Description |
---|---|
System.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
public DateTime MinDate { get; set; }
Property Value
Type | Description |
---|---|
System.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
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
public DateTime StartDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The default value is |
Value
Gets or sets the recurrence rule value.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
ValueChanged
Invoked when the recurrence value changes.
Declaration
public EventCallback<string> ValueChanged { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.String> |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
GetRecurrenceDates(DateTime, String, String, Nullable<Int32>, Nullable<DateTime>)
Gets the summary of the recurrence rule.
Declaration
public List<DateTime> GetRecurrenceDates(DateTime startDate, string rule, string excludeDate = null, Nullable<int> maximumCount = null, Nullable<DateTime> viewDate = null)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | startDate | Specifies the start date of the rule. |
System.String | rule | Recurrence rule. |
System.String | excludeDate | Specifies the date to be excluded. |
System.Nullable<System.Int32> | maximumCount | Specifies the maximum number of occurrences. |
System.Nullable<System.DateTime> | viewDate | Specifies the current view date. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.DateTime> | The date of occurrences for the specified rule. |
GetRecurrenceRule()
To get the recurrence rule.
Declaration
public string GetRecurrenceRule()
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | recurrenceRule | Recurrence rule. |
Returns
Type | Description |
---|---|
System.String | The summary of the recurrence rule in the recurrence editor. |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
SetRecurrenceRule(String, Nullable<DateTime>)
Sets the recurrence rule.
Declaration
public void SetRecurrenceRule(string rule, Nullable<DateTime> startDate = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | rule | Recurrence rule which needs to set in the recurrence editor. |
System.Nullable<System.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 |
---|---|---|
System.DateTime | endDate | Specifies the until date. |