+ long day = 0,
+ month = 0,
+ year = 0;
+ if ( m_day->GetValue().ToLong(&day) &&
+ m_month->GetValue().ToLong(&month) &&
+ m_year->GetValue().ToLong(&year) )
+ {
+ const wxDateTime someDay(day, wxDateTime::Month(month - 1), year);
+ if ( someDay.IsValid() )
+ {
+ m_datePicker->SetValue(someDay);
+ }
+ else
+ {
+ wxLogError(_T("Date is invalid"));
+ }
+ }
+ else
+ {
+ wxLogError(_T("One of inputs is not number"));
+ }