From 6c4284d109158f8a2ade413f4f455486055b870a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 4 Aug 2018 12:53:34 +0200 Subject: Deal with month changes --- views/calendar/qml/WeekView.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views/calendar/qml/WeekView.qml b/views/calendar/qml/WeekView.qml index 2f778d3b..ba9b24d2 100644 --- a/views/calendar/qml/WeekView.qml +++ b/views/calendar/qml/WeekView.qml @@ -232,12 +232,16 @@ FocusScope { color: Kube.Colors.viewBackgroundColor + function roundToDay(date) { + return new Date(date.getFullYear(), date.getMonth(), date.getDate()) + } + //Dimm days in the past Rectangle { anchors.fill: parent color: Kube.Colors.buttonColor opacity: 0.2 - visible: root.currentDate.getDate() > dayDelegate.date.getDate() + visible: roundToDay(root.currentDate) > roundToDay(dayDelegate.date) } //Grid -- cgit v1.2.3