﻿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
34660	Use RFC3339 format and input type=(date|time|datetime-local) for date/time/datetime form fields	Nicolás Stuardo Díaz	nobody	"Django should provide a global setting that makes DateInput, DateTimeInput and TimeInput widgets:
- Use RFC3339 formats for output even when USE_L10N is available.
- Render those widgets using their respective HTML5 input types.

as most modern browsers now have proper support for date, time and datetime fields and provide date pickers for each of them. The reasoning to use a setting is to make this change opt-in instead of breaking existing functionality.

#16630 and other tickets proposed the usage of `input type=""date""`, `time` and `datetime-local` for DateInput, TimeInput and DateTimeInput, respectively. By the time those proposals were made, browser support was lacking and most of them handled as simple text inputs, leaving support to polyfills and libraries. 10 years later, the situation changed.

Along with using HTML5 input types,  a specific formatting has to be used to ensure browsers handle them correctly. The spec mandates the use of RFC3339, a type of ISO 8601 format. Currently Django formats date values using localized formats, something that was correct when those fields were rendered as text fields or when the end user wants to use a specific format, but invalid when using `date`, `time` or `datetime-local`. There are several ways to patch this behavior currently such as defining custom locale formats or overriding form initialization and manually set input formats."	New feature	closed	Forms	dev	Normal	duplicate	html5	Gabriel Rojas	Unreviewed	0	0	0	0	0	0
