﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21470	"Make DateInput and DateTimeInput render as a html5 field type=""date"" and type=""datetime"""	Troy Grosfield	nobody	"One of my favorite changes to django 1.6 was making all the form inputs render to html5 types:

{{{
The default widgets for EmailField, URLField, IntegerField, FloatField and DecimalField 
use the new type attributes available in HTML5 (type='email', type='url', type='number'). 
Note that due to erratic support of the number input type with localized numbers in 
current browsers, Django only uses it when numeric fields are not localized.
}}}

So the big question here is why was the date and datetime fields left out if they all just fall back to rendering as text inputs anyway?

- http://www.w3.org/TR/html-markup/input.date.html
- http://www.w3.org/TR/html-markup/input.datetime.html

The untested change I think is simply:

- https://github.com/django/django/blob/master/django/forms/widgets.py#L431

{{{
class DateInput(DateTimeBaseInput):
    format_key = 'DATE_INPUT_FORMATS'
    input_type = 'date'
}}}


and 

- https://github.com/django/django/blob/master/django/forms/widgets.py#L435

{{{
class DateTimeInput(DateTimeBaseInput):
    format_key = 'DATETIME_INPUT_FORMATS'
    input_type = 'datetime'
}}}

"	New feature	closed	Forms	1.6	Normal	wontfix	datetime, date, widgets, inputs		Unreviewed	0	0	0	0	0	0
