-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add default editor templates for all numeric types, including short, ushort, and double, etc. #2261
Comments
@dougbu Can you check if short is actually supported? |
@weitzhandler server-side we simply execute any
I suspect the scenario you've opened this issue about is 2. in my list -- where we generate please confirm your request is for helper calls such as |
@dougbu |
short
and double
updated subject to reflect what would need to change here. @weitzhandler In the meantime you could create a Shared/EditorTemplates/Short.cshtml file containing for example @model short
@Html.TextBoxFor(m => m, htmlAttributes: new { type = "number" }) |
I'd also recommend adding those templates for |
short
and double
do you mean validation attributes? should get those automatically with what I recommended: @model short
@Html.TextBoxFor(m => m, htmlAttributes: new { type = "number" }) or, if you prefer tag helpers @model short
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
<input asp-for="@Model" type="number"/> otherwise feel free to include
|
- #2261 - include `short`, `ushort`, `float`, `double` - correct typo in `<input/>` tag helper; ignored calculated format - only one test for `<input/>`'s calculated format 😦 - fill some `Editor*()` and `<input/>` tag helper test gaps nit: clean up some trailing whitespace
- #2261 - include `short`, `ushort`, `float`, `double` - correct typo in `<input/>` tag helper; ignored calculated format - only one test for `<input/>`'s calculated format 😦 - fill some `Editor*()` and `<input/>` tag helper test gaps nit: clean up some trailing whitespace
fixed in 73e8fc1 |
Hi.
Please have a look at this post.
It addresses what the
System.ComponentModel.DataAnnotations.DataType
attribute is here for.Anyway, as per the closing note, only the following numeric types are supported:
I'd like to ask you to please include short in the numeric category as well.
The text was updated successfully, but these errors were encountered: