Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Added Step attribute to number input type #2795

Closed
wants to merge 1 commit into from
Closed

Conversation

ajaybhargavb
Copy link
Contributor

Issue - #2712
@dougbu

return GenerateTextBox(htmlHelper, inputType: "number");
var htmlAttributes =
CreateHtmlAttributes(htmlHelper, className: "text-box single-line", inputType: "number");
htmlAttributes["step"] = "any";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was needed for only decimal-enabled types: float, double, and decimal. For integral types there's no step needed, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus, the code here now looks more "complicated" because it seems to slightly duplicate some existing logic...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I was investigating #2780 and it is possible that we might not even need this change based on what we decide for that scenario.

@ajaybhargavb
Copy link
Contributor Author

Closing this PR since we decided to use type=text for float and double types.
Created #2812 with correct changes.

@ajaybhargavb ajaybhargavb deleted the step-attribute branch July 13, 2015 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants