#5728: SelectDateWidget does not work with datetime.date
-----------------------+----------------------------------------------------
Reporter: MikeH | Owner: nobody
Status: new | Component: django.newforms
Version: SVN | Keywords: SelectDateWidget
Stage: Unreviewed | Has_patch: 1
-----------------------+----------------------------------------------------
If I'm creating a form to update an existing object, I pass in the date
from the object. This is a datetime.date but the SelectDateWidget in
newforms.extras.widgets expects it to be a string, or else it does not set
the values on the select boxes correctly.
I solved the problem by forcing the incoming value to be a string.
Add
value = str(value)
at line 33 of django/newforms/extras/widgets.py (using revision 6468)
--
Ticket URL: <http://code.djangoproject.com/ticket/5728>
Django Code <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
-~----------~----~----~----~------~----~------~--~---