From 964f23b70eb72fe6f35b6cfe0b5642408239b4d6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Feb 2005 20:52:38 +0000 Subject: [PATCH] fix for Create(wxDateInvalidDate) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datectlg.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); -- 2.45.2