In my Blazor application, I wonder how I can allow an Input to accept either decimal numbers (e.g. 23.45) or fractions (e.g. 45 3/8)?
E.g. currently I have an Input that takes only decimals:
<InputNumber id="A" @bind-Value="_A" ParsingErrorMessage="A must be a valid number" class="form-control mx-2" />
In code-behind:
private double? _A;
If a decimal number is provided (e.g. 34 or 34.56), _A should be set to it as it is, and if a fraction is provided, it should be converted to a double. Is there any sample of how this can be achieved?