]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/datectrl.cpp
added vendor display name (for consistency with app display name &c) (patch 1831303)
[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__