diff options
-rw-r--r-- | views/calendar/qml/DateSelector.qml | 4 | ||||
-rw-r--r-- | views/calendar/qml/View.qml | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/views/calendar/qml/DateSelector.qml b/views/calendar/qml/DateSelector.qml index cdaa819b..890a1a8b 100644 --- a/views/calendar/qml/DateSelector.qml +++ b/views/calendar/qml/DateSelector.qml | |||
@@ -97,5 +97,9 @@ Column { | |||
97 | visible: model.day === root.selectedDate.getDate() && model.month === root.selectedDate.getMonth() | 97 | visible: model.day === root.selectedDate.getDate() && model.month === root.selectedDate.getMonth() |
98 | } | 98 | } |
99 | } | 99 | } |
100 | |||
101 | onClicked: { | ||
102 | root.selectedDate = date | ||
103 | } | ||
100 | } | 104 | } |
101 | } | 105 | } |
diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml index f49d8bff..3fc5d021 100644 --- a/views/calendar/qml/View.qml +++ b/views/calendar/qml/View.qml | |||
@@ -105,9 +105,11 @@ RowLayout { | |||
105 | spacing: Kube.Units.largeSpacing | 105 | spacing: Kube.Units.largeSpacing |
106 | 106 | ||
107 | DateSelector { | 107 | DateSelector { |
108 | id: dateSelector | ||
108 | selectedDate: root.selectedDate | 109 | selectedDate: root.selectedDate |
109 | onSelectedDateChanged: { | 110 | onSelectedDateChanged: { |
110 | root.selectedDate = selectedDate | 111 | root.selectedDate = getFirstDayOfWeek(dateSelector.selectedDate) |
112 | selectedDate = root.selectedDate | ||
111 | } | 113 | } |
112 | } | 114 | } |
113 | 115 | ||