[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/textwidgets.py handle missing values more reliably in the date and date/time display widgets

Fred L. Drake, Jr. fdrake at gmail.com
Wed Jan 19 13:56:23 EST 2005


Log message for revision 28875:
  handle missing values more reliably in the date and date/time display widgets

Changed:
  U   Zope3/trunk/src/zope/app/form/browser/textwidgets.py

-=-
Modified: Zope3/trunk/src/zope/app/form/browser/textwidgets.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/textwidgets.py	2005-01-19 18:53:12 UTC (rev 28874)
+++ Zope3/trunk/src/zope/app/form/browser/textwidgets.py	2005-01-19 18:56:21 UTC (rev 28875)
@@ -503,6 +503,8 @@
             content = self._data
         else:
             content = self.context.default
+        if content == self.context.missing_value:
+            return ""
         formatter = self.request.locale.dates.getFormatter(
             self._category, (self.displayStyle or None))
         content = formatter.format(content)



More information about the Zope3-Checkins mailing list