From 57afa10054753dd2926615be002fdd5de464fdd8 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 13 Feb 2019 15:09:36 +0100 Subject: Fix for date/time format used in the form implementation. --- src/main/kotlin/pl/treksoft/kvision/form/Form.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/pl') diff --git a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt index 983b83e5..ccd6363b 100644 --- a/src/main/kotlin/pl/treksoft/kvision/form/Form.kt +++ b/src/main/kotlin/pl/treksoft/kvision/form/Form.kt @@ -30,6 +30,7 @@ import kotlinx.serialization.serializer import pl.treksoft.kvision.i18n.I18n.trans import pl.treksoft.kvision.types.DateSerializer import pl.treksoft.kvision.types.KFile +import pl.treksoft.kvision.types.KV_JSON_DATE_FORMAT import pl.treksoft.kvision.types.toStringF import pl.treksoft.kvision.utils.JSON import pl.treksoft.kvision.utils.getContent @@ -90,7 +91,7 @@ class Form(private val panel: FormPanel? = null, private val seriali val map = it.flatMap { entry -> when (entry.value) { is Date -> { - listOf(entry.key to (entry.value as? Date)?.toStringF()) + listOf(entry.key to (entry.value as? Date)?.toStringF(KV_JSON_DATE_FORMAT)) } is List<*> -> { @Suppress("UNCHECKED_CAST") -- cgit