summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-20 09:19:19 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-20 09:19:19 +0200
commit8e2c52911ce2879166b4444fd5e821cb25b80fff (patch)
tree68bf06b510d8698adc0165d087923f74dad9002b
parente391871b400c768d70c2b57bcf0180e62c31acf0 (diff)
downloadkube-8e2c52911ce2879166b4444fd5e821cb25b80fff.tar.gz
kube-8e2c52911ce2879166b4444fd5e821cb25b80fff.zip
Display day number
-rw-r--r--views/calendar/qml/DayLabels.qml27
1 files changed, 18 insertions, 9 deletions
diff --git a/views/calendar/qml/DayLabels.qml b/views/calendar/qml/DayLabels.qml
index cd961068..391f3b0e 100644
--- a/views/calendar/qml/DayLabels.qml
+++ b/views/calendar/qml/DayLabels.qml
@@ -36,16 +36,25 @@ Row {
36 delegate: Item { 36 delegate: Item {
37 width: root.dayWidth 37 width: root.dayWidth
38 height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3 38 height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3
39 Kube.Label { 39 function addDaysToDate(date, days) {
40 function addDaysToDate(date, days) { 40 var date = new Date(date);
41 var date = new Date(date); 41 date.setDate(date.getDate() + days);
42 date.setDate(date.getDate() + days); 42 return date;
43 return date; 43 }
44 } 44 property date day: addDaysToDate(root.startDate, modelData)
45 font.bold: true 45 Column {
46
47 anchors.centerIn: parent 46 anchors.centerIn: parent
48 text: addDaysToDate(root.startDate, modelData).toLocaleString(Qt.locale(), "dddd") 47 Kube.Label {
48 anchors.horizontalCenter: parent.horizontalCenter
49 font.bold: true
50 text: day.toLocaleString(Qt.locale(), "dddd")
51 }
52 Kube.Label {
53 anchors.horizontalCenter: parent.horizontalCenter
54 text: day.toLocaleString(Qt.locale(), "d")
55 color: Kube.Colors.disabledTextColor
56 font.pointSize: Kube.Units.tinyFontSize
57 }
49 } 58 }
50 } 59 }
51 } 60 }