From 0abc39757981b52e7018feadbbf84cac9b49edd3 Mon Sep 17 00:00:00 2001 From: PeterPetrik Date: Thu, 5 Oct 2023 11:05:59 +0200 Subject: [PATCH] fix #2827 calendar pick with text source field --- app/qml/editor/inputdatetime.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/qml/editor/inputdatetime.qml b/app/qml/editor/inputdatetime.qml index c3a1475ad..bcec0dafd 100644 --- a/app/qml/editor/inputdatetime.qml +++ b/app/qml/editor/inputdatetime.qml @@ -195,7 +195,17 @@ AbstractEditor { onSelected: function( selectedDate ) { if ( selectedDate ) - root.editorValueChanged(selectedDate, false) + { + if ( root.parentField.isDateOrTime ) + { + root.editorValueChanged(selectedDate, false) + } + else + { + let dateStr = selectedDate.toLocaleString(Qt.locale(), config['field_format']) + root.editorValueChanged(dateStr, false) + } + } dateTimeDrawer.close() }