--- a/web/formwidgets.py Thu Sep 16 11:30:14 2010 +0200
+++ b/web/formwidgets.py Thu Sep 16 11:52:10 2010 +0200
@@ -653,10 +653,16 @@
timestr = req.form.get(field.input_name(form, 'time')).strip() or None
if datestr is None:
return None
- date = todatetime(req.parse_datetime(datestr, 'Date'))
+ try:
+ date = todatetime(req.parse_datetime(datestr, 'Date'))
+ except ValueError, exc:
+ raise ProcessFormError(unicode(exc))
if timestr is None:
return date
- time = req.parse_datetime(timestr, 'Time')
+ try:
+ time = req.parse_datetime(timestr, 'Time')
+ except ValueError, exc:
+ raise ProcessFormError(unicode(exc))
return date.replace(hour=time.hour, minute=time.minute, second=time.second)