From 772db97e03073a03b983c4679eece4f093aa4e5f Mon Sep 17 00:00:00 2001
From: Claudio Cambra <claudio.cambra@nextcloud.com>
Date: Mon, 8 May 2023 20:03:12 +0800
Subject: [PATCH] Track invalid input in ShareDetailsPage
 expireDateSpinBoxTextField

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
---
 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