Commit 3092eeb3 authored by Volker Krause's avatar Volker Krause
Browse files

Fix checks for non-set date/time values

parent 47274e1a
......@@ -38,7 +38,7 @@ ColumnLayout {
}
QQC2.Label {
text: certificate.dateOfBirth.toLocaleDateString(Qt.locale(), Locale.ShortFormat)
visible: certificate.dateOfBirth.getTime() != 0
visible: !isNaN(certificate.dateOfBirth.getTime())
Kirigami.FormData.label: i18n("Date of birth:")
}
......@@ -85,7 +85,7 @@ ColumnLayout {
QQC2.Label {
text: certificate.certificateExpiryDate.toLocaleString(Qt.locale(), Locale.ShortFormat)
Kirigami.FormData.label: i18n("Expires:")
visible: certificate.certificateExpiryDate.getTime() != 0
visible: !isNaN(certificate.certificateExpiryDate.getTime())
}
Kirigami.Icon {
source: {
......
......@@ -38,7 +38,7 @@ ColumnLayout {
}
QQC2.Label {
text: certificate.dateOfBirth.toLocaleDateString(Qt.locale(), Locale.ShortFormat)
visible: certificate.dateOfBirth.getTime() != 0
visible: !isNaN(certificate.dateOfBirth.getTime())
Kirigami.FormData.label: i18n("Date of birth:")
}
......@@ -103,7 +103,7 @@ ColumnLayout {
QQC2.Label {
text: certificate.certificateExpiryDate.toLocaleString(Qt.locale(), Locale.ShortFormat)
Kirigami.FormData.label: i18n("Expires:")
visible: certificate.certificateExpiryDate.getTime() != 0
visible: !isNaN(certificate.certificateExpiryDate.getTime())
}
Kirigami.Icon {
source: {
......
......@@ -38,7 +38,7 @@ ColumnLayout {
}
QQC2.Label {
text: certificate.dateOfBirth.toLocaleDateString(Qt.locale(), Locale.ShortFormat)
visible: certificate.dateOfBirth.getTime() != 0
visible: !isNaN(certificate.dateOfBirth.getTime())
Kirigami.FormData.label: i18n("Date of birth:")
}
......@@ -102,7 +102,7 @@ ColumnLayout {
QQC2.Label {
text: certificate.certificateExpiryDate.toLocaleString(Qt.locale(), Locale.ShortFormat)
Kirigami.FormData.label: i18n("Expires:")
visible: certificate.certificateExpiryDate.getTime() != 0
visible: !isNaN(certificate.certificateExpiryDate.getTime())
}
Kirigami.Icon {
source: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment