[Django] #22538: Support for HTML5 Date and Time input fields

5 views
Skip to first unread message

Django

unread,
Apr 29, 2014, 3:54:14 AM4/29/14
to django-...@googlegroups.com
#22538: Support for HTML5 Date and Time input fields
-------------------------------+--------------------
Reporter: me@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
By default, the input_type of fields of type DateInput, DateTimeInput,
TimeInput in the file django/forms/widgets.py is "text". This is because
these fields inherit from TextField class which has input_type = "text".

If we change the input_type in each of the classes to their HTML5
specified equivalent, forms will be better.

{{{
...
class DateInput(TextInput):
input_type = "date"
...

...
class DateTimeInput(TextInput):
input_type = "datetime"
...

...
class TimeInput(TextInput):
input_type = "time"
...
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22538>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 29, 2014, 3:59:19 AM4/29/14
to django-...@googlegroups.com
#22538: Support for HTML5 Date and Time input fields
-------------------------------+--------------------------------------
Reporter: me@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Forms | Version: 1.6
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by anonymous):

* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/22538#comment:1>

Django

unread,
Apr 12, 2018, 7:35:59 PM4/12/18
to django-...@googlegroups.com
#22538: Support for HTML5 Date and Time input fields
-------------------------------+--------------------------------------
Reporter: me@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Forms | Version: 1.6
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by W. Trevor King):

For folks finding this (old) issue and wondering which issue this is a
duplicate of, I'm guessing it's #16630 based on comment:2:ticket:21470
closing a similar request for native type="date", etc. There's also some
related (and slightly more recent) discussion in #11385.

And since
[https://github.com/django/django/commit/f1bdfbd24bcc76d21c4bf7442959bdf630ac4dec
f1bdfbd2 (v1.5a)], you've been able to explicitly set `type` via `attrs`,
so folks who want a specific input type can make that happen.

--
Ticket URL: <https://code.djangoproject.com/ticket/22538#comment:2>

Django

unread,
Apr 12, 2018, 7:40:45 PM4/12/18
to django-...@googlegroups.com
#22538: Support for HTML5 Date and Time input fields
-------------------------------+--------------------------------------
Reporter: me@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Forms | Version: 1.6
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by W. Trevor King):

* cc: W. Trevor King (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/22538#comment:3>

Reply all
Reply to author
Forward
0 new messages