Commit f1123841 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fixed date misalignment in date picker

parent 83302300
Pipeline #91991 passed with stage
in 5 minutes and 6 seconds
......@@ -155,7 +155,8 @@ QVariant MonthModel::data(const QModelIndex &index, int role) const
// Previous month
year = d->month > 0 ? d->year : d->year - 1;
month = d->month > 0 ? d->month - 1 : d->calendar.monthsInYear(year) - 1;
day = daysInMonth - prefix + row + 1;
int daysInPreviousMonth = d->calendar.daysInMonth(month, year);
day = daysInPreviousMonth - prefix + row + 1;
}
if (role == DayNumber || role == Qt::DisplayRole) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment