From: Vadim Zeitlin Date: Sat, 19 Feb 2005 20:52:38 +0000 (+0000) Subject: fix for Create(wxDateInvalidDate) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/964f23b70eb72fe6f35b6cfe0b5642408239b4d6 fix for Create(wxDateInvalidDate) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index 97baf6e944..6fcc0b63eb 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -375,10 +375,7 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent, m_popup->SetClientSize(panel->GetSize()); m_popup->Hide(); - if (!date.IsValid()) - date.Today(); - - SetValue(date); + SetValue(date.IsValid() ? date : wxDateTime::Today()); SetBestFittingSize(size);