summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcalendarwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qcalendarwidget.cpp')
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index f9345d056c..caa3cbfd4d 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -1928,7 +1928,6 @@ void QCalendarWidgetPrivate::_q_nextMonthClicked()
void QCalendarWidgetPrivate::_q_yearEditingFinished()
{
Q_Q(QCalendarWidget);
- yearButton->setText(q->locale().toString(yearEdit->value()));
yearEdit->hide();
q->setFocusPolicy(oldFocusPolicy);
qApp->removeEventFilter(q);
@@ -1937,6 +1936,7 @@ void QCalendarWidgetPrivate::_q_yearEditingFinished()
QDate currentDate = getCurrentDate();
int newYear = q->locale().toInt(yearEdit->text());
currentDate = currentDate.addYears(newYear - currentDate.year(m_model->m_calendar), m_model->m_calendar);
+ yearButton->setText(q->locale().toString(currentDate, u"yyyy", m_model->m_calendar));
updateCurrentPage(currentDate);
}
@@ -2952,7 +2952,7 @@ void QCalendarWidget::setDateEditEnabled(bool enable)
\since 4.3
If the calendar widget's \l{dateEditEnabled}{date edit is enabled}, this
- property specifies the amount of time (in millseconds) that the date edit
+ property specifies the amount of time (in milliseconds) that the date edit
remains open after the most recent user input. Once this time has elapsed,
the date specified in the date edit is accepted and the popup is closed.