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.
--
Ticket URL: <https://code.djangoproject.com/ticket/34660>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Gabriel Rojas (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/34660#comment:1>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #21470 and #33100. This was also [https://groups.google.com/g
/django-developers/c/wp-pnzcB25o/m/D5gEOzPIAQAJ discussed] on the mailing
list.
--
Ticket URL: <https://code.djangoproject.com/ticket/34660#comment:2>