#19015 closed Bug (fixed)
Slovenian L10N - date field validation does not work for hidden fields
Reported by: | bmihelac | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When DateInput has HiddenInput widget, it renders value by converting date to string This produces iso-8601 (YYYY-MM-DD) format.
Because iso-8601 format is not stated in slovenian flavor DATE_INPUT_FORMATS, validation will fail if USE_L10N=True and hidden date field exists.
This issue applies to some other locales as well:
ack --py --files-without-matches '%Y-%m-%d' conf/locale/
Change History (9)
comment:1 by , 12 years ago
Summary: | Slovenian l10n does not work with hidden fields → Slovenian L10N - date field validation does not work for hidden fields |
---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Component: | contrib.localflavor → Internationalization |
---|---|
Triage Stage: | Unreviewed → Accepted |
I also think that we should consider adding iso formats by default, then remove them from the formats.py file.
comment:4 by , 12 years ago
Has patch: | set |
---|
New pull request which solves the issue by automatically adding ISO input formats to all localized input formats.
comment:5 by , 12 years ago
This pull request looks great to me. Agree it is better to implicitly add ISO formats.
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch for slovenian language is available:
https://github.com/django/django/pull/390