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:
parent
1e867f276b
commit
2ca48a7d2d
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user