Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#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)

datetime_error_message.diff (1.5 KB ) - added by dryice 15 years ago.

Download all attachments as: .zip

Change History (6)

by dryice, 15 years ago

Attachment: datetime_error_message.diff added

comment:1 by dryice, 15 years ago

The strings are the same as in db/models/fields/init.py

comment:2 by Eric Holscher, 15 years ago

Triage Stage: UnreviewedAccepted

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 dryice, 15 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 Chris Beaven, 13 years ago

Resolution: wontfix
Severity: Normal
Status: newclosed
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 dryice, 13 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.

Note: See TracTickets for help on using tickets.
Back to Top