From: Vadim Zeitlin <vadim@wxwidgets.org> Date: Sun, 10 Dec 2006 13:46:12 +0000 (+0000) Subject: fixed off by one error in OnButtonSet() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/84abef1a34f3986de2a40747493fd7da66778368 fixed off by one error in OnButtonSet() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/widgets/datepick.cpp b/samples/widgets/datepick.cpp index 4295abc9c2..86b809a441 100644 --- a/samples/widgets/datepick.cpp +++ b/samples/widgets/datepick.cpp @@ -228,7 +228,7 @@ void DatePickerWidgetsPage::OnButtonSet(wxCommandEvent& WXUNUSED(event)) m_month->GetValue().ToLong(&month) && m_year->GetValue().ToLong(&year) ) { - const wxDateTime someDay(day, wxDateTime::Month(month), year); + const wxDateTime someDay(day, wxDateTime::Month(month - 1), year); if ( someDay.IsValid() ) { m_datePicker->SetValue(someDay);