From: Vadim Zeitlin Date: Wed, 17 Jan 2007 23:31:05 +0000 (+0000) Subject: discard time part of m_date, otherwise comparisons with other dates fail X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5541976c17c0550eb2a5ea010c701d9119780193?ds=sidebyside;hp=7d69a5715e0b348c99c41072ce3d3b4c3b9c62f4 discard time part of m_date, otherwise comparisons with other dates fail git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/datectrl.cpp b/src/msw/datectrl.cpp index 8191af9fc3..438f347694 100644 --- a/src/msw/datectrl.cpp +++ b/src/msw/datectrl.cpp @@ -256,7 +256,10 @@ 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; + m_date.ResetTime(); } wxDateTime wxDatePickerCtrl::GetValue() const