calendar: Don't use current day number in goToMonth

Fix goToMonth when that month does not have current day number
(eg. today = 31).

REVIEW: 125894
This commit is contained in:
David Rosca 2015-10-31 22:17:15 +01:00
parent 1e867f276b
commit 2ca48a7d2d

View File

@ -331,10 +331,10 @@ void Calendar::previousMonth()
void Calendar::goToMonth(int month)
{
setDisplayedDate(QDate(m_displayedDate.year(), month, m_displayedDate.day()));
setDisplayedDate(QDate(m_displayedDate.year(), month, 1));
}
void Calendar::goToYear(int year)
{
setDisplayedDate(QDate(year, m_displayedDate.month(), m_displayedDate.day()));
setDisplayedDate(QDate(year, m_displayedDate.month(), 1));
}