diff options
Diffstat (limited to 'src/widgets/widgets/qdatetimeedit.cpp')
-rw-r--r-- | src/widgets/widgets/qdatetimeedit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp index 5697c96791..e57d1f9db5 100644 --- a/src/widgets/widgets/qdatetimeedit.cpp +++ b/src/widgets/widgets/qdatetimeedit.cpp @@ -2037,13 +2037,14 @@ QDateTime QDateTimeEditPrivate::validateAndInterpret(QString &input, int &positi } StateNode tmp = parse(input, position, value.toDateTime(), fixup); + // Take note of any corrections imposed during parsing: + input = m_text; // Impose this widget's spec: tmp.value = tmp.value.toTimeSpec(spec); // ... but that might turn a valid datetime into an invalid one: if (!tmp.value.isValid() && tmp.state == Acceptable) tmp.state = Intermediate; - input = tmp.input; position += tmp.padded; state = QValidator::State(int(tmp.state)); if (state == QValidator::Acceptable) { |