I believe Rick Copeland fixed this issue late last week on the TG 1.0 trunk.

Barry

----- Original Message ----
From: krsyoung <[EMAIL PROTECTED]>
To: TurboGears <[email protected]>
Sent: Saturday, September 22, 2007 1:46:33 PM
Subject: [TurboGears] Re: DateTimePicker not working


On Sep 20, 1:40 am, Dero <[EMAIL PROTECTED]> wrote:
> Hello
>
>  after updating a tg application to tg 1.04b1
>  we get following errors from the line :
>
>  jobdate = CalendarDateTimePicker(label = _('Job Date'),name =
> 'jobdate',calendar_lang = 'en',format = '%d/%m/%Y %H:%M',validator =
> validators.DateTimeConverter(format="%d/%m/%Y %H:%M"))
>
> Error shown :
>
> "/usr/lib/python2.5/site-packages/SQLObject-0.9.0b1-py2.5.egg/
> sqlobject/col.py", line 1067, in from_python
>     (self.name, type(value), value), value, state)
> Invalid: expected a datetime in the DateTimeCol 'jobdate', got <type
> 'unicode'> u'20/09/2007 13:25' instead
>
> This had worked before in tg 1.0 or thereabouts.
> Apparently the converter does not what it is supposed to do.
>
> Is there an easy way for a fast fix ?
> We need to store date and time .
>
> Thanks

Hey,

I had the same problem, going to 1.04b1 using MySQL.  I avoided it by
adding the following before the save method:

@validate(validators={'required_date':validators.All(validators.DateValidator(today_or_after=True),
 
validators.DateTimeConverter)})

That fixed the issue (but then it breaks when I move it over to my
1.0.3.2 production environment).  In both environments I have
FormEncode 0.7.1.

Hope this helps,
Chris











      
____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, 
and more!
http://tv.yahoo.com/collections/3658 
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to