Opened 11 years ago
Closed 11 years ago
#21752 closed Bug (fixed)
forms.NumberInput - "step" always forced to "any", cannot modify
Reported by: | Owned by: | Claude Paroz | |
---|---|---|---|
Component: | Forms | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm trying to customize my form widgets, and I have the following code:
rand_range = forms.NumberInput(attrs={'step': 0.01, 'max': 1.0, 'min': 0.0})
However when the field is rendered in HTML, the step is always set to "any". I have also tried putting the number in quotes to no perceivable result. "min" and "max" values are working correctly.
Attachments (1)
Change History (5)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
I can confirm. I'll investigate this issue.
by , 11 years ago
Attachment: | 21752-1.diff added |
---|
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Could you write a test for Django's test suite that demonstrates the issue? There are some tests for step in forms_tests/tests/test_fields.py.