aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Widget.kt3
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
index a746ffa4..8e66d130 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
@@ -289,8 +289,9 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent() {
}
}
destroy = { _ ->
- vnode = null
afterDestroy()
+ vnode = null
+ vnode
}
}
return hooks
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
index 3eeec789..6004b320 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
@@ -215,6 +215,10 @@ open class DateTimeInput(
}
}
+ override fun afterDestroy() {
+ getElementJQueryD()?.datetimepicker("remove")
+ }
+
private fun initDateTimePicker() {
val datePickerFormat = format.toDatePickerFormat()
val minView = if (format.contains("HH") || format.contains("mm")) 0 else 2