#9721: DateTimeField does not support all DEFAULT_DATETIME_INPUT_FORMATS when
passed a list as input
-----------------------------------------------+----------------------------
Reporter: uggedal | Owner: nobody
Status: new | Milestone:
Component: Forms | Version: SVN
Keywords: DateTimeFIeld SplitDateTimeWidget | Stage: Unreviewed
Has_patch: 1 |
-----------------------------------------------+----------------------------
When using for instance a SplitDateTimeWidget with a DateTimeField one can
not provide valid input to be parsed with the following formats:
{{{
'%Y-%m-%d', # '2006-10-25'
'%m/%d/%Y', # '10/25/2006'
'%m/%d/%y', # '10/25/06'
}}}
One can therefore not create a split input solution where the time
component is not required. The reason lies in SplitDateTimeWidget's clean
method for list input. The date and time parts are concatenated together
with a space between them. I included a patch for the simplest thing that
would work (albeit possible not the best way to handle this).
SplitDateTimeField exists, but this field explicitly requires both date
and time fields to be included.
--
Ticket URL: <http://code.djangoproject.com/ticket/9721>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---