New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic data: Support decimal properties with an editor control #117

HeyJoel opened this Issue Jun 8, 2017 · 1 comment


None yet
1 participant
Copy link

HeyJoel commented Jun 8, 2017

If you have a custom entity with a decimal property, there's no corresponding input control in the admin UI and the field does not display in the form.

We have a FormFieldNumber control, so we probably just need to support a mapping between the decimal type and optional formatters to match the html5 step property.

@HeyJoel HeyJoel added the enhancement label Jun 8, 2017

@HeyJoel HeyJoel added this to the 0.1.8 milestone Jun 8, 2017

@HeyJoel HeyJoel self-assigned this Jun 8, 2017


This comment has been minimized.

Copy link

HeyJoel commented Jun 8, 2017

I've implemented a two new attributes you can make use of NumberAttribute and PlaceholderAttribute. You can use these to add attributes to the number html5 input to help with formatting different number styles.

Here's an example of using the attributes to describe an input that accepts number values to two decimal places:

[Placeholder("e.g. 0.1")]
[Display(Name = "Test Decimal")]
[Number(Step = "0.1")]
public decimal TestDecimal { get; set; }

Additionally you can use the existing RangeAttribute to specify a min/max value.

@HeyJoel HeyJoel closed this Jun 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment