Numeric Input

Basic usage

Used for entering numeric data, it can be configured by setting the
Opt
parameter:
<ONumericInput @bind-Value="model.NumericFloat"
    Opt="@(new() { Decimals = 2, Min = 20, Max = 150, FormatFunc = formatCurrency })" />
...
private string formatCurrency(double? val)
{
    if (val is null) return string.Empty;
    return val.Value.ToString("N2") + " $";
}

NumericInputOpt

Numeric input options model
AfterChangeFuncFunction to execute after value has changed
ClearBtnClear button
CssClassMain container css class
DecimalsNumber of decimals
DisabledIs editor disabled
FormatFuncDisplay value format function, will receive the value as parameter and returns the display value as string
MaxMaximum value
MinMinimum value
PlaceholderInput placeholder
ShowSpinnersShow input spin up/down buttons
StepIncrease/decrease button step



Comments
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our cookie policy and privacy policy .