X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4164aa980f7639254f44abfbf7ce31db2a21c4f..4d6d8bf4fb93f77bfe7f259ab03a31d7a180a33b:/src/msw/datectrl.cpp diff --git a/src/msw/datectrl.cpp b/src/msw/datectrl.cpp index c9129f8756..4e8a940ad6 100644 --- a/src/msw/datectrl.cpp +++ b/src/msw/datectrl.cpp @@ -156,6 +156,8 @@ wxDatePickerCtrl::Create(wxWindow *parent, if ( dt.IsValid() || (style & wxDP_ALLOWNONE) ) SetValue(dt); + else + SetValue(wxDateTime::Today()); return true; } @@ -254,7 +256,7 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt) wxLogDebug(_T("DateTime_SetSystemtime() failed")); } - m_date = dt; + wxFromSystemTime(&m_date, st); } wxDateTime wxDatePickerCtrl::GetValue() const