]> git.saurik.com Git - wxWidgets.git/commitdiff
discard time part of m_date, otherwise comparisons with other dates fail
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Jan 2007 23:31:05 +0000 (23:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Jan 2007 23:31:05 +0000 (23:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/datectrl.cpp

index 8191af9fc37c098471381718464e12805efe57a6..438f34769407e1e9825ad3ce2445b6a60d058182 100644 (file)
@@ -256,7 +256,10 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
         wxLogDebug(_T("DateTime_SetSystemtime() failed"));
     }
 
         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;
     m_date = dt;
+    m_date.ResetTime();
 }
 
 wxDateTime wxDatePickerCtrl::GetValue() const
 }
 
 wxDateTime wxDatePickerCtrl::GetValue() const