X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa74ad5b789859926ea230a4ae84942953be4edb..0aaa804e7019b8187e2d35dffba133b43af79533:/src/generic/datectlg.cpp diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index b088654129..2c2a33d58a 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -29,7 +29,8 @@ // use this version if we're explicitly requested to do it or if it's the only // one we have -#if wxUSE_DATEPICKCTRL_GENERIC || !defined(wxHAS_NATIVE_DATEPICKCTRL) +#if !defined(wxHAS_NATIVE_DATEPICKCTRL) || \ + (defined(wxUSE_DATEPICKCTRL_GENERIC) && wxUSE_DATEPICKCTRL_GENERIC) #ifndef WX_PRECOMP #include "wx/bmpbuttn.h" @@ -867,7 +868,7 @@ void wxDatePickerCtrlGeneric::OnKillFocus(wxFocusEvent &ev) m_txt->SetValue(wxEmptyString); // notify that we had to change the date after validation - if ( (dt.IsValid() && m_currentDate != dt) || + if ( (dt.IsValid() && (!m_currentDate.IsValid() || m_currentDate != dt)) || (!dt.IsValid() && m_currentDate.IsValid()) ) { m_currentDate = dt;