From d0e8e67c724709ba7202d3a730925caffac51c65 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 90044734aa6b..a8755526f5e3 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