Class SfDateRangePicker<TValue>
The DateRangePicker is a graphical user interface component that allows user to select the date range from the calendar.
Inheritance
System.Object
Syncfusion.Blazor.SfBaseComponent
SfDateRangePicker<TValue>
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfDateRangePicker<TValue> : CalendarBase<TValue>, IDateRangePicker, IInputBase
Type Parameters
Constructors
SfDateRangePicker()
Declaration
public SfDateRangePicker()
Properties
AllowEdit
Specifies a boolean value whether the DateRangePicker allows user to change the value via typing. When set as false, the DateRangePicker allows user to change the value via picker only.
Declaration
public bool AllowEdit { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CssClass
Specifies the CSS class name that can be appended with the root element of the DateRangePicker. One or more custom CSS classes can be added to a DateRangePicker.
Declaration
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
DateRangePickerParent
Declaration
protected dynamic DateRangePickerParent { get; set; }
Property Value
Type |
Description |
System.Object |
|
Enabled
Specifies a boolean value that indicates whether the DateRangePicker allows the user to interact with it.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableRtl
Enable or disable rendering DateRangePicker in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EndDate
Gets or sets the end date of the date range selection.
Declaration
public TValue EndDate { get; set; }
Property Value
EndDateChanged
Triggers when end date of the DateRangePicker is changed.
Declaration
public EventCallback<TValue> EndDateChanged { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.EventCallback<TValue> |
|
EndDateExpression
Specifies the expression for defining the end date of the bound.
Declaration
public Expression<Func<TValue>> EndDateExpression { get; set; }
Property Value
Type |
Description |
System.Linq.Expressions.Expression<System.Func<TValue>> |
|
FloatLabelType
Specifies the floating label behavior of the DateRangePicker that the placeholder text floats above the DateRangePicker based on the following values.
Possible values are:
- NeverNever floats the label in the DateRangePicker when the placeholder is available.
- AlwaysThe floating label always floats above the DateRangePicker.
- AutoThe floating label floats above the DateRangePicker after focusing it or when enters the value in it.
Declaration
public FloatLabelType FloatLabelType { get; set; }
Property Value
Sets or gets the required date format to the start and end date string.
By default, the format is based on the culture.
You can set the format to "format:'dd/MM/yyyy hh:mm'".
Declaration
public string Format { get; set; }
Property Value
Type |
Description |
System.String |
|
HtmlAttributes
You can add the additional input attributes such as disabled, value, and more to the root element.
If you configured both the property and equivalent input attribute, then the DateRangePicker considers the property value.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
ID
Specifies the id of the DateRangePicker component.
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
You can add the additional input attributes such as disabled, value, and more to the root element.
If you configured both the property and equivalent input attribute, then the component considers the property value.
Declaration
public Dictionary<string, object> InputAttributes { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
MaxDays
Specifies the maximum span of days that can be allowed in a date range selection.
Declaration
public Nullable<int> MaxDays { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
MinDays
Specifies the minimum span of days that can be allowed in date range selection.
Declaration
public Nullable<int> MinDays { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
Placeholder
Specifies the text that is shown as a hint or placeholder until the user focuses or enter a value in DateRangePicker. The property is depending on the FloatLabelType property.
Declaration
public string Placeholder { get; set; }
Property Value
Type |
Description |
System.String |
|
Presets
Specifies the Presets of the dateRangePicker popup element.
Declaration
public List<Presets> Presets { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<Presets> |
|
Readonly
Specifies a boolean value whether the DateRangePicker allows the user to change the text.
Declaration
public bool Readonly { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Separator
Sets or gets the string that used between the start and end date string.
Declaration
public string Separator { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies whether to show or hide the clear icon in DateRangePicker.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
StartDate
Gets or sets the start date of the date range selection.
Declaration
public TValue StartDate { get; set; }
Property Value
StartDateExpression
Specifies the expression for defining the start date of the bound.
Declaration
public Expression<Func<TValue>> StartDateExpression { get; set; }
Property Value
Type |
Description |
System.Linq.Expressions.Expression<System.Func<TValue>> |
|
StrictMode
Declaration
public bool StrictMode { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Value
Gets or sets the selected date of the Calendar.
Declaration
public object Value { get; set; }
Property Value
Type |
Description |
System.Object |
|
ValueChanged
Specifies the callback to trigger when the value changes.
Declaration
public EventCallback<object> ValueChanged { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
|
ValueExpression
Specifies the expression for defining the value of the bound.
Declaration
public Expression<Func<object>> ValueExpression { get; set; }
Property Value
Type |
Description |
System.Linq.Expressions.Expression<System.Func<System.Object>> |
|
Width
Specifies the width of the DateRangePicker component.
Declaration
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|
ZIndex
specifies the z-index value of the DateRangePicker popup element.
Declaration
public int ZIndex { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder |
__builder |
|
changeHandler(ChangeEventArgs)
Declaration
protected Task changeHandler(ChangeEventArgs args)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Components.ChangeEventArgs |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
CurrentView()
Gets the current view of the calendar.
Declaration
public string CurrentView()
Returns
Type |
Description |
System.String |
|
FocusIn()
Sets focus to the DateRangePicker component for interaction.
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
FocusOut()
Remove focus from the DateRangePicker component, if the component is in focus state.
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
GetPersistData()
Gets the properties to be maintained in the persisted state.
Declaration
public Task<string> GetPersistData()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
Hide()
Hide the calendar popup.
Specifies the event arguments
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
System.Boolean |
firstRender |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(System.Boolean)
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Syncfusion.Blazor.SfBaseComponent.OnInitializedAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
OnPresetItemMouseOut()
Declaration
protected Task OnPresetItemMouseOut()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Show()
Opens the popup to show the calendar.
Specifies the event arguments
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
UpdateChildProperties(Object)
Declaration
public void UpdateChildProperties(object presetValue)
Parameters
Type |
Name |
Description |
System.Object |
presetValue |
|
Declaration
public void UpdateHeaders()
Implements