diff --git a/src/contents/ui/main.qml b/src/contents/ui/main.qml index 1bcdc621b643aa9443951fb2fce08ad0c7ee4aca..83d2d51fc657b8879aec9c002d686b7f87541191 100644 --- a/src/contents/ui/main.qml +++ b/src/contents/ui/main.qml @@ -2,6 +2,7 @@ import QtQuick 2.9 import org.kde.kirigami 2.12 as Kirigami import QtQuick.Controls 2.9 as Controls import QtQuick.Layouts 1.12 as Layouts +import QtQuick.Controls 1.4 as Old Kirigami.ApplicationWindow { id: root @@ -223,6 +224,15 @@ Kirigami.ApplicationWindow { text: notes } } + actions: [ + Kirigami.Action { + text: qsTr("Remove") + iconName: "edit-delete" + onTriggered: { + //TODO + } + } + ] } } } @@ -259,11 +269,21 @@ Kirigami.ApplicationWindow { Kirigami.FormData.label: qsTr("Service Type")+":" } - Controls.TextField { - id: dateField - selectByMouse: true + Layouts.RowLayout { Kirigami.FormData.label: qsTr("Date")+":" - inputMethodHints: Qt.ImhDate //TODO: implement better input + Controls.TextField { + id: dateField + text: new Date().toLocaleDateString(Qt.locale()) + readOnly: true + } + Controls.Button { + icon.name: "office-calendar" + text: qsTr("Select Date") + display: Controls.AbstractButton.IconOnly + onClicked: { + calendarPopup.open(); + } + } } Controls.TextField { @@ -302,6 +322,16 @@ Kirigami.ApplicationWindow { } } } + + Kirigami.OverlaySheet { + id: calendarPopup + Old.Calendar { + selectedDate: Date.fromLocaleDateString(Qt.locale(), dateField.text) + onClicked: { + dateField.text = date.toLocaleDateString(Qt.locale()); + } + } + } } } }