dabo Commit
Revision 3885
Date: 2008-01-18 10:08:49 -0800 (Fri, 18 Jan 2008)
Author: Johnf
Trac: http://svn.dabodev.com/trac/dabo/changeset/3885

Changed:
U   trunk/dabo/ui/uiwx/dDateTextBox.py

Log:
Changed the way class CalPanel set setting the default date.  I was having 
trouble with a dDateTextBox passing a empty string (u'')

Diff:
Modified: trunk/dabo/ui/uiwx/dDateTextBox.py
===================================================================
--- trunk/dabo/ui/uiwx/dDateTextBox.py  2008-01-18 04:05:02 UTC (rev 3884)
+++ trunk/dabo/ui/uiwx/dDateTextBox.py  2008-01-18 18:08:49 UTC (rev 3885)
@@ -17,10 +17,10 @@
 
 class CalPanel(dPanel):
        def __init__(self, parent, pos=None, dt=None, ctrl=None ):
-               if dt is None:
+               if isinstance(dt, (datetime.datetime, datetime.date)):
+                       self.date = dt
+               else:
                        self.date = datetime.date.today()
-               else:
-                       self.date = dt
                self.ctrl = ctrl
                super(CalPanel, self).__init__(parent, pos=pos)
                




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to