#35293: Django 5.x changes the date format on an <input type="date"> from
"2012-10-01" to "01/10/2012"
-------------------------------------------+------------------------
               Reporter:  Shaheed Haque    |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Template system  |        Version:  5.0
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 We are attempting to migrate from Django 4.11 to Django 5.0.latest. Our
 tests identified that Date inputs which were previous rendered with a
 "value" attribute in ISO8601 date format now seem to be rendered using en-
 GB. Here is what the 4.x renders:

 {{{
 <input type="date" name="..." value="2012-10-01" class=" form-control"
 required="" id="...">
 }}}

 versus what 5.x renders:

 {{{
 <input type="date" name="..." value="01/10/2012" class=" form-control"
 required="" aria-describedby="..." id="...">
 }}}

 Our settings have not changed. Here is a subset of what we have:

 {{{
 LANGUAGE_CODE = 'en-gb'
 LANGUAGES = (
     ('en-gb', _('English (GB)')),
 )
 TIME_ZONE = 'UTC'
 USE_I18N = True
 USE_L10N = False
 USE_TZ = True
 }}}

 Note that we do NOT have any of the DATE_FORMAT, DATE_INPUT_FORMATS etc.
 set, so they should have their default values. I have reviewed the release
 notes but did not see anything relevant. I have tried debugging the code
 in django.utils.formats but is not clear to me where the difference
 originates.

 In case it is relevant, we are using the Jinja backend with bootstrap
 styling and our own templates, but the core "field" rendering should be
 whatever Django does.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35293>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e324aec36-736deb4f-4b5e-48f4-ae6b-d3ee81f805d5-000000%40eu-central-1.amazonses.com.

Reply via email to