Commit 076a9e58 authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

Display end time on events view

parent 711feb81
......@@ -94,20 +94,17 @@ Kirigami.Page {
contentItem: Column {
Controls2.Label {
wrapMode: Text.WordWrap
text: model.description
}
property bool sameEndStart : model.dtstart && !isNaN(model.dtstart) && model.dtend && !isNaN(model.dtend) && model.dtstart.toLocaleString(Qt.locale(), "dd.MM.yyyy") == model.dtend.toLocaleString(Qt.locale(), "dd.MM.yyyy")
Controls2.Label {
visible: model.dtstart && !isNaN(model.dtstart) //&& model.dtstart.toLocaleTimeString(Qt.locale()) != ""
wrapMode: Text.WordWrap
text: (model.dtstart && !isNaN(model.dtstart)) ? model.dtstart.toLocaleDateString(Qt.locale()) : ""
text: ((model.dtstart && !isNaN(model.dtstart)) ? model.dtstart.toLocaleString(Qt.locale(), "ddd d MMM yyyy hh:mm" ) : "") +
(model.dtend && !isNaN(model.dtend) ? " - " +
model.dtend.toLocaleString(Qt.locale(), sameEndStart ? "hh:mm" : "ddd d MMM yyyy hh:mm" ) : "")
}
Controls2.Label {
visible: model.dtstart && !isNaN(model.dtstart) //&& model.dtstart.toLocaleTimeString(Qt.locale()) != ""
wrapMode: Text.WordWrap
text: (model.dtstart && !isNaN(model.dtstart)) ? model.dtstart.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) : ""
text: model.description
}
Controls2.Label {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment