summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-04 15:51:30 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-04 15:51:30 +0200
commit0b5f790868449db960263214b6ea5d81dbfc3a4b (patch)
tree341c634f7273a0087e0cd06d4ced90223cd58588
parentdd0e823ddd72dda8adb3da5adf896abaed4feffe (diff)
downloadkube-0b5f790868449db960263214b6ea5d81dbfc3a4b.tar.gz
kube-0b5f790868449db960263214b6ea5d81dbfc3a4b.zip
Clicking date-selector works as well
-rw-r--r--views/calendar/qml/DateSelector.qml4
-rw-r--r--views/calendar/qml/View.qml4
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