]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed off by one error in OnButtonSet()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 10 Dec 2006 13:46:12 +0000 (13:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 10 Dec 2006 13:46:12 +0000 (13:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/widgets/datepick.cpp

index 4295abc9c27a13004c62984f67a7c6395bb2adf2..86b809a4416c1cf5081c18ea3762d67973c206ad 100644 (file)
@@ -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);