aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-02-13 15:09:36 +0100
committerRobert Jaros <rjaros@finn.pl>2019-02-13 15:09:36 +0100
commit57afa10054753dd2926615be002fdd5de464fdd8 (patch)
tree65f859c6d9ec57fcbf002be3ac892cc001913c2f /src/main/kotlin/pl/treksoft/kvision
parentea23ddd8dd11e9645b1dd061f373c3a0bade78f0 (diff)
downloadkvision-57afa10054753dd2926615be002fdd5de464fdd8.tar.gz
kvision-57afa10054753dd2926615be002fdd5de464fdd8.tar.bz2
kvision-57afa10054753dd2926615be002fdd5de464fdd8.zip
Fix for date/time format used in the form implementation.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/Form.kt3
1 files changed, 2 insertions, 1 deletions
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<K : Any>(private val panel: FormPanel<K>? = 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")