Class BOBInputDateRange
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputDateRange : BOBInputComponentBase<DateRange, BOBInputDateRange, BOBInputVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputVariant>, IVariantComponent, IBuiltComponent, IHasSize, IHasLoading, IHasDensity, IHasColor, IHasBackgroundColor, IHasShadow, IHasPrefix, IHasSuffix, IInputFamilyComponent
- Inheritance
-
objectComponentBaseInputBase<DateRange>BOBInputDateRange
- Implements
- Inherited Members
Constructors
BOBInputDateRange()
public BOBInputDateRange()
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
Compile-time map of variants to their built-in render templates.
protected override IReadOnlyDictionary<BOBInputVariant, Func<BOBInputDateRange, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<BOBInputVariant, Func<BOBInputDateRange, 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
Variant used when no Variant is supplied.
public override BOBInputVariant DefaultVariant { get; }
Property Value
Density
Vertical density of the input.
[Parameter]
public BOBDensity Density { get; set; }
Property Value
EndPlaceholder
Placeholder shown in the end input when empty. Same caveat as StartPlaceholder.
[Parameter]
public string? EndPlaceholder { get; set; }
Property Value
- string
HelperText
Helper text displayed below the input.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
Label
Floating label displayed above the input.
[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
Prefix background color.
[Parameter]
public string? PrefixBackgroundColor { get; set; }
Property Value
- string
PrefixColor
Prefix foreground color.
[Parameter]
public string? PrefixColor { get; set; }
Property Value
- string
PrefixIcon
Prefix icon rendered before the start input.
[Parameter]
public IconKey? PrefixIcon { get; set; }
Property Value
PrefixText
Prefix text rendered before the start input.
[Parameter]
public string? PrefixText { get; set; }
Property Value
- string
Separator
Separator glyph rendered between the start and end inputs. Defaults to "→".
[Parameter]
public string Separator { get; set; }
Property Value
- string
Shadow
Shadow style forwarded to both inner BOBInputDateTime<TValue> inputs.
[Parameter]
public ShadowStyle? Shadow { get; set; }
Property Value
Size
Visual size of the input.
[Parameter]
public BOBSize Size { get; set; }
Property Value
StartPlaceholder
Placeholder shown in the start input when empty. Drives the floating-label slot of the inner BOBInputDateTime<TValue> — its outline only renders when the label is non-empty, so passing an empty string here hides the input's border.
[Parameter]
public string? StartPlaceholder { get; set; }
Property Value
- string
SuffixBackgroundColor
Suffix background color.
[Parameter]
public string? SuffixBackgroundColor { get; set; }
Property Value
- string
SuffixColor
Suffix foreground color.
[Parameter]
public string? SuffixColor { get; set; }
Property Value
- string
SuffixIcon
Suffix icon rendered after the end input.
[Parameter]
public IconKey? SuffixIcon { get; set; }
Property Value
SuffixText
Suffix text rendered after the end input.
[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(DateRange)
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(DateRange value)
Parameters
valueDateRangeThe value to format.
Returns
- string
A string representation of the value.
TryParseValueFromString(string?, out DateRange, out string?)
Parses a string to create an instance of DateRange. 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 DateRange result, out string? validationErrorMessage)
Parameters
valuestringThe string value to be parsed.
resultDateRangeAn instance of DateRange.
validationErrorMessagestringIf the value could not be parsed, provides a validation error message.
Returns
- bool
True if the value could be parsed; otherwise false.