Skip to content

Add support for binding decimal, double, float data type with configurable formatting #5523

@Andrzej-W

Description

This should work

<input @bind="@price"/>
@code
{
    decimal price;
}

but currently we get an exception:
Error: System.ArgumentException: 'bind' does not accept values of type System.Decimal. To read and write this value type, wrap it in a property of type string with suitable getters and setters.

Decimal data type is paramount in every business application. We don't want to use "hacks" and convert it to/from string manually every time.

Support for formatting is also crucial (number of decimal places, decimal and thousandth separators)

Metadata

Assignees

Labels

Pillar: Technical DebtPriority:2Work that is important, but not critical for the releaseaffected-mediumThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-component-modelAny feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)help candidateIndicates that the issues may be a good fit for community to help with. Requires work from eng. teamseverity-majorThis label is used by an internal tool

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions