From 9ab104b38a1aba71d2b35c6eb7a51c476e4abec2 Mon Sep 17 00:00:00 2001 From: rating89us <45968869+rating89us@users.noreply.github.com> Date: Sun, 6 Jun 2021 21:55:34 +0200 Subject: [PATCH] DatePicker: display currently selected month when opening calendar --- components/DatePicker.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/DatePicker.qml b/components/DatePicker.qml index 8a79b2e8..554c731a 100644 --- a/components/DatePicker.qml +++ b/components/DatePicker.qml @@ -252,6 +252,10 @@ Item { id: popup padding: 0 closePolicy: QtQuickControls2.Popup.CloseOnEscape | QtQuickControls2.Popup.CloseOnPressOutsideParent + onOpened: { + calendar.visibleMonth = currentDate.getMonth(); + calendar.visibleYear = currentDate.getFullYear(); + } Rectangle { id: calendarRect