From ef5ee5d7b11cb6e51da318dde71eeb1bb709ccce Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 8 May 2023 20:03:12 +0800 Subject: [PATCH] Track invalid input in ShareDetailsPage expireDateSpinBoxTextField Signed-off-by: Claudio Cambra --- src/gui/filedetails/ShareDetailsPage.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/filedetails/ShareDetailsPage.qml b/src/gui/filedetails/ShareDetailsPage.qml index 90044734aa6bd..a8755526f5e3b 100644 --- a/src/gui/filedetails/ShareDetailsPage.qml +++ b/src/gui/filedetails/ShareDetailsPage.qml @@ -778,6 +778,11 @@ Page { contentItem: NCInputTextField { id: expireDateSpinBoxTextField + validInput: { + const value = expireDateSpinBox.valueFromText(text); + return value >= expireDateSpinBox.from && value <= expireDateSpinBox.to; + } + text: expireDateSpinBox.textFromValue(expireDateSpinBox.value, expireDateSpinBox.locale) readOnly: !expireDateSpinBox.editable validator: expireDateSpinBox.validator