Skip to content

Commit

Permalink
Track invalid input in ShareDetailsPage expireDateSpinBoxTextField
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra authored and backportbot-nextcloud[bot] committed Jul 20, 2023
1 parent e79afac commit da05abe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/filedetails/ShareDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da05abe

Please sign in to comment.