Class BOBInputDateTime<TValue>
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputDateTime<TValue> : BOBInputComponentBase<TValue, BOBInputDateTime<TValue>, BOBInputVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputVariant>, IVariantComponent, IBuiltComponent, IHasSize, IHasLoading, IHasDensity, IHasShadow, IHasColor, IHasBackgroundColor, IHasPrefix, IHasSuffix, IInputFamilyComponent
Type Parameters
TValue
- Inheritance
-
objectComponentBaseInputBase<TValue>BOBInputComponentBase<TValue>BOBInputDateTime<TValue>
- Implements
- Inherited Members
Constructors
BOBInputDateTime()
public BOBInputDateTime()
Properties
BackgroundColor
Background color of the input. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? BackgroundColor { get; set; }
Property Value
- string
BuiltInTemplates
protected override IReadOnlyDictionary<BOBInputVariant, Func<BOBInputDateTime<TValue>, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<BOBInputVariant, Func<BOBInputDateTime<TValue>, RenderFragment>>
Color
Text color of the input. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Default variant used when no explicit variant is specified.
public override BOBInputVariant DefaultVariant { get; }
Property Value
Density
Vertical density (gap) of the input.
[Parameter]
public BOBDensity Density { get; set; }
Property Value
HelperText
Helper text displayed below the component for additional context.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
Label
Floating label displayed above the input when it has a value or focus.
[Parameter]
public string? Label { get; set; }
Property Value
- string
Loading
When true, the input shows a loading indicator.
[Parameter]
public bool Loading { get; set; }
Property Value
- bool
LoadingIndicatorVariant
[Parameter]
public BOBProgressIconVariant LoadingIndicatorVariant { get; set; }
Property Value
PrefixBackgroundColor
PrefixBackground color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? PrefixBackgroundColor { get; set; }
Property Value
- string
PrefixColor
Prefix color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? PrefixColor { get; set; }
Property Value
- string
PrefixIcon
Material icon name for the Prefix.
[Parameter]
public IconKey? PrefixIcon { get; set; }
Property Value
PrefixText
Text displayed before the input value.
[Parameter]
public string? PrefixText { get; set; }
Property Value
- string
Shadow
Shadow style applied to the input container.
[Parameter]
public ShadowStyle? Shadow { get; set; }
Property Value
Size
Visual size of the input.
[Parameter]
public BOBSize Size { get; set; }
Property Value
SuffixBackgroundColor
SuffixBackground color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? SuffixBackgroundColor { get; set; }
Property Value
- string
SuffixColor
Suffix color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? SuffixColor { get; set; }
Property Value
- string
SuffixIcon
Material icon name for the Suffix.
[Parameter]
public IconKey? SuffixIcon { get; set; }
Property Value
SuffixText
Text displayed after the input value.
[Parameter]
public string? SuffixText { get; set; }
Property Value
- string
Methods
BuildComponentCssVariables(Dictionary<string, string>)
Contributes additional CSS custom properties to the inline style attribute. Keys
that collide with framework-owned --bob-inline-* variables will be overwritten.
public void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>
BuildComponentDataAttributes(Dictionary<string, object>)
Contributes additional data- attributes to the root element. Keys that collide
with framework-owned data-bob- attributes will be overwritten.
public void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)
Parameters
dataAttributesDictionary<string, object>
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
FormatValueAsString(TValue?)
Formats the value as a string. Derived classes can override this to determine the formatting used for Microsoft.AspNetCore.Components.Forms.InputBase<TValue>.CurrentValueAsString.
protected override string? FormatValueAsString(TValue? value)
Parameters
valueTValueThe value to format.
Returns
- string
A string representation of the value.
OnInitialized()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
protected override void OnInitialized()
OnParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override void OnParametersSet()
TryParseValueFromString(string?, out TValue, out string?)
Parses a string to create an instance of TValue. Derived classes can override this to change how
Microsoft.AspNetCore.Components.Forms.InputBase<TValue>.CurrentValueAsString interprets incoming values.
protected override bool TryParseValueFromString(string? value, out TValue result, out string? validationErrorMessage)
Parameters
valuestringThe string value to be parsed.
resultTValueAn instance of
TValue.validationErrorMessagestringIf the value could not be parsed, provides a validation error message.
Returns
- bool
True if the value could be parsed; otherwise false.