#10353 closed New feature (wontfix)
prompt the correct date/time format in the error message
Reported by: | dryice | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.0 |
Severity: | Normal | Keywords: | date time datetime |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | UI/UX: |
Description
prompt the correct date/time format in the error message in case the user want to manually input the date/time fields.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | datetime_error_message.diff added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
This seems like a logical change. Giving people more information about errors is generally better.
I don't know about the "programmery" strings like: HH:MM[:ss[.uuuuuu]]. I dunno if people need to know about microseconds. Perhaps just using HH:MM there?
comment:3 by , 16 years ago
The strings are the same as in source:django/trunk/django/db/models/fields/__init__.py to be consistent. But yes, I agree that end user don't need to know about microseconds most of the time.
comment:4 by , 14 years ago
Resolution: | → wontfix |
---|---|
Severity: | → Normal |
Status: | new → closed |
Type: | → New feature |
I'm not sure this is a good idea. It relies on the assumption that the field needs to be entered in a specific format. What if you're using a SelectDateWidget
, or alternative input_formats
on the field?
comment:5 by , 14 years ago
"the assumption that the field needs to be entered in a specific format" is not coded in this patch, it's already in the code for DateField/TimeField/DateTimeField
However I saw another reason why the patch should not be applied: Because the format check in the existing code has been i18n-ed, and checking all the formats.py in django/conf/locale/xx, there's no a universal format. So specifying the YYYY-MM-DD format in the error message may confuse some users don't use this format.
The strings are the same as in db/models/fields/init.py