I changed the code in SelectDateWidget (django/forms/extras) to return month
as '01' instead of '0'. I do not know if this problem is GAE specific. I
would appreciate if someone from Django dev group confirms this issue and
provides an appropriate fix.
if y and m and d:
if settings.USE_L10N:
input_format = get_format('DATE_INPUT_FORMATS')[0]
try:
date_value = datetime.date(int(y), int(m), int(d))
except ValueError:
pass
else:
date_value = datetime_safe.new_date(date_value)
return date_value.strftime(input_format)
else:
# Added the next 2 lines
if len(m) == 1:
m = u'0'+m
if len(d) == 1:
d = u'0'+d
return '%s-%s-%s' % (y, m, d)
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en.