- Timestamp:
- 1 Nov 2012, 15:41:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/widgets/datewidget.py
r8193 r9498 127 127 def _toFormValue(self, value): 128 128 if value: 129 value = value.strftime(self.date_format) 129 try: 130 value = value.strftime(self.date_format) 131 except ValueError: 132 return value 130 133 return value 131 134 … … 168 171 tz = utils.tzinfo 169 172 content = to_timezone(content, tz) 170 content = content.strftime(self.date_format) 173 try: 174 content = content.strftime(self.date_format) 175 except ValueError: 176 return None 171 177 return renderElement("span", contents=escape(content), 172 178 cssClass=self.cssClass)
Note: See TracChangeset for help on using the changeset viewer.