aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-bootstrap-datetime/src
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-bootstrap-datetime/src')
-rw-r--r--kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt13
1 files changed, 8 insertions, 5 deletions
diff --git a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt
index fdf9f95a..4f3f3f48 100644
--- a/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt
+++ b/kvision-modules/kvision-bootstrap-datetime/src/main/kotlin/pl/treksoft/kvision/form/time/DateTime.kt
@@ -217,15 +217,18 @@ open class DateTime(
}
@Suppress("UNCHECKED_CAST")
- override fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Widget {
- input.setEventListener(block)
- return this
+ override fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Int {
+ return input.setEventListener(block)
}
@Deprecated("Use onEvent extension function instead.", ReplaceWith("onEvent(block)", "pl.treksoft.kvision.core.onEvent"))
- override fun setEventListener(block: SnOn<Widget>.() -> Unit): Widget {
+ override fun setEventListener(block: SnOn<Widget>.() -> Unit): Int {
@Suppress("DEPRECATION")
- input.setEventListener(block)
+ return input.setEventListener(block)
+ }
+
+ override fun removeEventListener(id: Int): Widget {
+ input.removeEventListener(id)
return this
}