]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/datectrl.cpp
fix off by one (or rather "off by border width") bug in ScrollWindow() (part of patch...
[wxWidgets.git] / src / msw / datectrl.cpp
index 8191af9fc37c098471381718464e12805efe57a6..58a3b435c2951dcea56be5cd59f199c4cf1c2237 100644 (file)
@@ -256,9 +256,15 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
         wxLogDebug(_T("DateTime_SetSystemtime() failed"));
     }
 
+    // we need to keep only the date part, times don't make sense for this
+    // control (in particular, comparisons with other dates would fail)
     m_date = dt;
+    if ( m_date.IsValid() )
+        m_date.ResetTime();
 }
 
+#include <iostream>
+
 wxDateTime wxDatePickerCtrl::GetValue() const
 {
 #ifdef __WXDEBUG__