diff options
Diffstat (limited to 'xfa/fwl/core/ifwl_monthcalendar.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_monthcalendar.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/xfa/fwl/core/ifwl_monthcalendar.cpp b/xfa/fwl/core/ifwl_monthcalendar.cpp index 0137f195c9..aaa15e47ae 100644 --- a/xfa/fwl/core/ifwl_monthcalendar.cpp +++ b/xfa/fwl/core/ifwl_monthcalendar.cpp @@ -724,22 +724,14 @@ void IFWL_MonthCalendar::GetCapValue() { } void IFWL_MonthCalendar::InitDate() { - if (m_pProperties->m_pDataProvider) { - IFWL_MonthCalendar::DataProvider* pDateProv = - static_cast<IFWL_MonthCalendar::DataProvider*>( - m_pProperties->m_pDataProvider); - m_iYear = pDateProv->GetCurYear(this); - m_iMonth = pDateProv->GetCurMonth(this); - m_iDay = pDateProv->GetCurDay(this); - m_iCurYear = m_iYear; - m_iCurMonth = m_iMonth; - } else { - m_iDay = 1; - m_iMonth = 1; - m_iYear = 1; - m_iCurYear = m_iYear; - m_iCurMonth = m_iMonth; - } + // TODO(dsinclair): These should pull the real today values instead of + // pretending it's 2011-01-01. + m_iYear = 2011; + m_iMonth = 1; + m_iDay = 1; + m_iCurYear = m_iYear; + m_iCurMonth = m_iMonth; + GetTodayText(m_iYear, m_iMonth, m_iDay, m_wsToday); GetHeadText(m_iCurYear, m_iCurMonth, m_wsHead); m_dtMin = DATE(1500, 12, 1); |