X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb0afb266214f827417c42474168c7edda7c953e..03d51a2d4095e3a2da174f8d6963c4802e636e95:/src/generic/calctrl.cpp?ds=inline diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index bf6dea6c5e..bce1b1167d 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -321,6 +321,7 @@ bool wxCalendarCtrl::Create(wxWindow *parent, // above it SetSize(pos.x, pos.y, sizeReal.x, sizeReal.y); + SetForegroundColour(*wxBLACK); SetBackgroundColour(*wxWHITE); SetFont(*wxSWISS_FONT); @@ -668,11 +669,9 @@ bool wxCalendarCtrl::IsDateShown(const wxDateTime& date) const bool wxCalendarCtrl::IsDateInRange(const wxDateTime& date) const { - bool retval = TRUE; // Check if the given date is in the range specified - retval = ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : TRUE ) + return ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : TRUE ) && ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : TRUE ) ); - return retval; } bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const @@ -1371,7 +1370,7 @@ bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) c } else { - day += ( startOnMonday ) ? 0 : 1; + *day += ( startOnMonday ) ? 0 : 1; } int targetmonth = date.GetMonth() + (12 * date.GetYear());