From 9294ffdf371fbae8c166dd5e3c63955f1d3ab18e Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 1 May 2018 20:46:54 +0000 Subject: Start at today's date in XFA Month Calendar. Bug: pdfium:751 Change-Id: I125fbb0dd8ff4a382c4cec33a29c52a97e67de23 Reviewed-on: https://pdfium-review.googlesource.com/31851 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- xfa/fwl/cfwl_monthcalendar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xfa') diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp index 08ed83f4f1..af865b530b 100644 --- a/xfa/fwl/cfwl_monthcalendar.cpp +++ b/xfa/fwl/cfwl_monthcalendar.cpp @@ -552,11 +552,11 @@ void CFWL_MonthCalendar::GetCapValue() { } void CFWL_MonthCalendar::InitDate() { - // 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; + CFX_DateTime now = CFX_DateTime::Now(); + + m_iYear = now.GetYear(); + m_iMonth = now.GetMonth(); + m_iDay = now.GetDay(); m_iCurYear = m_iYear; m_iCurMonth = m_iMonth; -- cgit v1.2.3