Table of Contents

Class MBDateTimeField

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

A Material Theme date input field. This wraps MBTextField and normally displays the numeric value as formatted text, but switches to a pure number on being selected.

public class MBDateTimeField : InputComponent<DateTime>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
MBDateTimeField
Implements
Inherited Members

Constructors

MBDateTimeField()

public MBDateTimeField()

Properties

DateOnly

The datetime can optionally suppress the time portion and just return dates (at midnight)

[Parameter]
public bool DateOnly { get; set; }

Property Value

bool

Density

The numeric field's density.

[Parameter]
public MBDensity? Density { get; set; }

Property Value

MBDensity?

HelperText

Helper text that is displayed either with focus or persistently with HelperTextPersistent.

[Parameter]
public string HelperText { get; set; }

Property Value

string

HelperTextPersistent

Makes the HelperText persistent if true.

[Parameter]
public bool HelperTextPersistent { get; set; }

Property Value

bool

IconFoundry

The foundry to use for both leading and trailing icons.

IconFoundry="IconHelper.MIIcon()"

IconFoundry="IconHelper.FAIcon()"

IconFoundry="IconHelper.OIIcon()"

Overrides IconFoundryName

[Parameter]
public IMBIconFoundry? IconFoundry { get; set; }

Property Value

IMBIconFoundry

Label

Field label.

[Parameter]
public string? Label { get; set; }

Property Value

string

LeadingIcon

The leading icon's name. No leading icon shown if not set.

[Parameter]
public string? LeadingIcon { get; set; }

Property Value

string

MaxDate

The maximum allowable value.

[Parameter]
public DateTime MaxDate { get; set; }

Property Value

DateTime

MinDate

The minimum allowable value.

[Parameter]
public DateTime MinDate { get; set; }

Property Value

DateTime

Prefix

Prefix text.

[Parameter]
public string? Prefix { get; set; }

Property Value

string

Suffix

Suffix text.

[Parameter]
public string? Suffix { get; set; }

Property Value

string

SuppressDefaultDate

Set to indicate that if the value is default(DateTime) then no date is initially shown

[Parameter]
public bool SuppressDefaultDate { get; set; }

Property Value

bool

TextInputStyle

The text input style.

Overrides TextInputStyle

[Parameter]
public MBTextInputStyle? TextInputStyle { get; set; }

Property Value

MBTextInputStyle?

TrailingIcon

The trailing icon's name. No leading icon shown if not set.

[Parameter]
public string? TrailingIcon { get; set; }

Property Value

string

ValidationMessageFor

       Delivers Material Theme validation methods from native Blazor validation. Either use this or
       the Blazor 

       <pre><code class="lang-csharp">ValidationMessage</code></pre>

component, but not both. This parameter takes the same input as

       <pre><code class="lang-csharp">ValidationMessage</code></pre>

       's 

       <pre><code class="lang-csharp">For</code></pre>

parameter.

[Parameter]
public Expression<Func<object>> ValidationMessageFor { get; set; }

Property Value

Expression<Func<object>>

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnInitializedAsync()

protected override Task OnInitializedAsync()

Returns

Task

OnParametersSetAsync()

When overriding this, call await base.OnParametersSetAsync(); before any user code unless there is a very good reason not to.

protected override Task OnParametersSetAsync()

Returns

Task