Opened 13 years ago
Closed 13 years ago
#19686 closed New feature (fixed)
Support HTML5 number input type
| Reported by: | Claude Paroz | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | charette.s@… | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In #16630, we added support for type="email" and type="url" HTML5 input types.
This ticket is about type="number" input type. It has been separated so as we can discuss specific issues, in particular localization issues.
Attachments (1)
Change History (8)
comment:1 by , 13 years ago
| Cc: | added |
|---|---|
| Has patch: | unset |
| Version: | 1.4 → master |
comment:2 by , 13 years ago
| Has patch: | set |
|---|
Pull request, with conditional use of NumberInput depending on Field.localize: https://github.com/django/django/pull/696
by , 13 years ago
| Attachment: | ticket-19686-claudep-github-revised.diff added |
|---|
comment:4 by , 13 years ago
| Patch needs improvement: | unset |
|---|
Attached a version of claudep's patch with additionnal tests and a fix forDecimalField's input "maxlength".
comment:6 by , 13 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:7 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The number input implementation seems to be a bit unstable at the moment.
Chrome implemented it quickly and attempted to localize the input value to the useragent's locale while submitting it the document (or closest parent with a lang attribute) locale. It raised some issues and it's quite hard to work with.
Firefox halted development because many questions arose concerning the decimal mark, group size and separator.