Comment (by Natalia Bidart):
Replying to [comment:11 Claude Paroz]:
> Is the behavior the same if you remove `localized_fields`?
I can confirm the behavior is the same. I have completely commented out
the `localized_fields` definition in the `BookForm` and the date fields
are still showing in the language requested by my browser (es) and not in
the language defined by the language cookie (en).
--
Ticket URL: <https://code.djangoproject.com/ticket/34853#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
I had a look at your issue. This is an issue with the `<input
type="date">` widgets. And this is exactly why Django doesn't use
`type="date"` by default. With those inputs, browsers are forcing their
content to the format of the current active browser locale, whatever the
language of the page language. So Django cannot do anything to change
that.
Read the last comment of #34660 and the tickets/discussion it references.
--
Ticket URL: <https://code.djangoproject.com/ticket/34853#comment:14>
Comment (by Natalia Bidart):
Replying to [comment:14 Claude Paroz]:
> I had a look at your issue. This is an issue with the `<input
type="date">` widgets. And this is exactly why Django doesn't use
`type="date"` by default. With those inputs, browsers are forcing their
content to the format of the current active browser locale, whatever the
language of the page language. So Django cannot do anything to change
that.
>
> Read the last comment of #34660 and the tickets/discussion it
references.
Thank you Claude, I missed the override for the widget's type attr. TIL
many things regarding this topic!
--
Ticket URL: <https://code.djangoproject.com/ticket/34853#comment:15>
* stage: Accepted => Unreviewed
--
Ticket URL: <https://code.djangoproject.com/ticket/34853#comment:16>