From ead7ac8686841ef43e2524d04a664e375cae3300 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Sun, 6 Nov 2016 18:03:32 +0300 Subject: [PATCH] Historty: DoubleValidator applied to "amount filter" fields --- pages/History.qml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pages/History.qml b/pages/History.qml index a6c216bf..8821bb12 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -229,10 +229,12 @@ Rectangle { model.paymentIdFilter = paymentIdLine.text model.dateFromFilter = fromDatePicker.currentDate model.dateToFilter = toDatePicker.currentDate + if (advancedFilteringCheckBox.checked) { if (amountFromLine.text.length) { model.amountFromFilter = parseFloat(amountFromLine.text) } + if (amountToLine.text.length) { model.amountToFilter = parseFloat(amountToLine.text) } @@ -243,7 +245,6 @@ Rectangle { } selectedAmount.text = getSelectedAmount() - } } @@ -315,6 +316,15 @@ Rectangle { anchors.leftMargin: 17 anchors.topMargin: 5 width: 156 + validator: DoubleValidator { + locale: "C" + notation: DoubleValidator.StandardNotation + bottom: 0.0 + top: { + console.log("top"); + parseFloat(amountToLine.text) + } + } } Label { @@ -336,6 +346,15 @@ Rectangle { anchors.leftMargin: 17 anchors.topMargin: 5 width: 156 + validator: DoubleValidator { + locale: "C" + notation: DoubleValidator.StandardNotation + bottom: { + console.log("Botton") + parseFloat(amountFromLine.text) + } + } + } Item {