From 5a6fe287524f4a39473db44e6e86a1f105aae079 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Fri, 6 Apr 2012 00:09:40 -0400 Subject: [PATCH] desktop: CalendarEdit: added MakeDateRecent() calls for date fields By default the start/end/recurend dates are all loaded, but if the dates are "invalid" to start with, it starts out at 1970. So add checks to bump the dates into recent territory when initializing the dialog. --- desktop/src/CalendarEditDlg.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/desktop/src/CalendarEditDlg.cc b/desktop/src/CalendarEditDlg.cc index 7840e0c7..35bbe9a5 100644 --- a/desktop/src/CalendarEditDlg.cc +++ b/desktop/src/CalendarEditDlg.cc @@ -583,7 +583,17 @@ bool CalendarEditDlg::TransferDataToWindow() m_strings.RefreshWx(); - return wxDialog::TransferDataToWindow(); + // let the base class call the validaors to do the rest + if( wxDialog::TransferDataToWindow() ) { + // on success, do just a little bit of fine tuning + MakeDateRecent(true, m_StartDateCtrl); + MakeDateRecent(true, m_EndDateCtrl); + MakeDateRecent(true, m_RecurEndDateCtrl); + return true; + } + else { + return false; + } } bool CalendarEditDlg::TransferDataFromWindow() -- 2.11.4.GIT