summaryrefslogtreecommitdiffstats
path: root/views/calendar/qml/DayLabels.qml
diff options
context:
space:
mode:
Diffstat (limited to 'views/calendar/qml/DayLabels.qml')
-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 }