aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-10-25 20:46:42 +0200
committerRobert Jaros <rjaros@finn.pl>2019-10-25 20:46:42 +0200
commitc78775aa2aaf76f9fa1404ff32a10fb8227f380e (patch)
treea6991e1f520e1ce54679b2194a756203a645f99e /kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision
parenta990385dd3f2dbac4807b7a9498271efb3519c0d (diff)
downloadkvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.tar.gz
kvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.tar.bz2
kvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.zip
Style fixes
Diffstat (limited to 'kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision')
-rw-r--r--kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
index 178fbeaa..f9f170a9 100644
--- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
+++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
@@ -241,8 +241,7 @@ open class DateTimeInput(
override fun afterDestroy() {
if (initialized) {
- val comp = getElementJQueryD()?.data("DateTimePicker")
- if (comp != null) comp.destroy()
+ getElementJQueryD()?.data("DateTimePicker")?.destroy()
initialized = false
}
}
@@ -314,6 +313,7 @@ open class DateTimeInput(
private fun initEventHandlers() {
this.getElementJQuery()?.on("dp.change") { e, _ ->
val moment = e.asDynamic().date
+ @Suppress("UnsafeCastFromDynamic")
if (moment) {
this.value = moment.toDate()
} else {