Table of Contents

Class MudDateRangePicker

Namespace
MudBlazor
Assembly
MudBlazor.dll

Represents a picker for a range of dates.

public class MudDateRangePicker : MudBaseDatePicker, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IDisposable
Inheritance
MudDateRangePicker
Implements
Inherited Members
Extension Methods

Constructors

MudDateRangePicker()

Creates a new instance.

public MudDateRangePicker()

Properties

DateRange

The currently selected date range.

[Parameter]
[Category("Data")]
public DateRange DateRange { get; set; }

Property Value

DateRange

DateRangeChanged

Occurs when DateRange has changed.

[Parameter]
public EventCallback<DateRange> DateRangeChanged { get; set; }

Property Value

EventCallback<DateRange>

InputContent

protected override RenderFragment InputContent { get; }

Property Value

RenderFragment

IsRange

protected override bool IsRange { get; }

Property Value

bool

PlaceholderEnd

The text displayed in the end input if no date is specified.

[Parameter]
[Category("Behavior")]
public string PlaceholderEnd { get; set; }

Property Value

string

Remarks

This property is typically used to give the user a hint as to what kind of input is expected.

PlaceholderStart

The text displayed in the start input if no date is specified.

[Parameter]
[Category("Behavior")]
public string PlaceholderStart { get; set; }

Property Value

string

Remarks

This property is typically used to give the user a hint as to what kind of input is expected.

SeparatorIcon

The icon displayed between start and end dates.

[Parameter]
[Category("Appearance")]
public string SeparatorIcon { get; set; }

Property Value

string

Remarks

Defaults to ArrowRightAlt.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

ClearAsync(bool)

public override Task ClearAsync(bool close = true)

Parameters

close bool

Returns

Task

DateFormatChangedAsync(string)

Occurs when the DateFormat has changed.

protected override Task DateFormatChangedAsync(string newFormat)

Parameters

newFormat string

Returns

Task

FocusEndAsync()

Focuses the end input.

public ValueTask FocusEndAsync()

Returns

ValueTask

FocusStartAsync()

Focuses the start input.

public ValueTask FocusStartAsync()

Returns

ValueTask

GetCalendarStartOfMonth()

protected override DateTime GetCalendarStartOfMonth()

Returns

DateTime

GetCalendarYear(DateTime)

protected override int GetCalendarYear(DateTime yearDate)

Parameters

yearDate DateTime

Returns

int

GetDayClasses(int, DateTime)

protected override string GetDayClasses(int month, DateTime day)

Parameters

month int
day DateTime

Returns

string

GetTitleDateString()

protected override string GetTitleDateString()

Returns

string

HasValue(DateTime?)

protected override bool HasValue(DateTime? value)

Parameters

value DateTime?

Returns

bool

OnDayClickedAsync(DateTime)

User clicked on a day

protected override Task OnDayClickedAsync(DateTime dateTime)

Parameters

dateTime DateTime

Returns

Task

OnOpenedAsync()

protected override Task OnOpenedAsync()

Returns

Task

OnPickerClosedAsync()

protected override Task OnPickerClosedAsync()

Returns

Task

SelectEndAsync()

Selects the end input text.

public ValueTask SelectEndAsync()

Returns

ValueTask

SelectRangeEndAsync(int, int)

Selects a portion of the end input text.

public ValueTask SelectRangeEndAsync(int pos1, int pos2)

Parameters

pos1 int

The index of the first character to select.

pos2 int

The index of the last character to select.

Returns

ValueTask

SelectRangeStartAsync(int, int)

Selects a portion of the start input text.

public ValueTask SelectRangeStartAsync(int pos1, int pos2)

Parameters

pos1 int

The index of the first character to select.

pos2 int

The index of the last character to select.

Returns

ValueTask

SelectStartAsync()

Selects the start input text.

public ValueTask SelectStartAsync()

Returns

ValueTask

SetDateRangeAsync(DateRange, bool)

protected Task SetDateRangeAsync(DateRange range, bool updateValue)

Parameters

range DateRange
updateValue bool

Returns

Task

StringValueChangedAsync(string)

Occurs when the string value has changed.

protected override Task StringValueChangedAsync(string value)

Parameters

value string

Returns

Task

SubmitAsync()

protected override Task SubmitAsync()

Returns

Task