kvision / pl.treksoft.kvision.onsenui.form / OnsDateTimeInput

OnsDateTimeInput

(js) open class OnsDateTimeInput : Widget, FormInput, ObservableState<Date?>

OnsenUI date/time input component.

Constructors

(js)

<init>

Creates a date/time input component.

OnsDateTimeInput(value: Date? = null, mode: DateTimeMode = DateTimeMode.DATETIME, min: Date? = null, max: Date? = null, step: Number? = null, inputId: String? = null, classes: Set<String> = setOf(), init: (OnsDateTimeInput.() -> Unit)? = null)

Properties

(js)

autocomplete

Determines if autocomplete is enabled for the input element.

var autocomplete: Boolean?
(js)

autofocus

Determines if the date/time input is automatically focused.

var autofocus: Boolean?
(js)

disabled

Determines if the field is disabled.

open var disabled: Boolean
(js)

inputId

The ID of the input element.

var inputId: String?
(js)

max

Maximal date/time value.

var max: Date?
(js)

min

Minimal date/time value.

var min: Date?
(js)

mode

Date/time mode.

var mode: DateTimeMode
(js)

modifier

A modifier attribute to specify custom styles.

var modifier: String?
(js)

name

The name attribute of the generated HTML input element.

open var name: String?
(js)

observers

val observers: MutableList<(Date?) -> Unit>
(js)

readonly

Determines if the date/time input is read-only.

var readonly: Boolean?
(js)

size

The size of the input.

open var size: InputSize?
(js)

startValue

The value attribute of the generated HTML input element.

var startValue: Date?
(js)

step

Step value.

var step: Number?
(js)

validationStatus

The validation status of the input.

open var validationStatus: ValidationStatus?
(js)

value

Date/time input value.

var value: Date?

Functions

(js)

afterInsert

Method called after inserting Snabbdom vnode into the DOM.

open fun afterInsert(node: VNode): Unit
(js)

blur

Makes the input element blur.

open fun blur(): Unit
(js)

focus

Makes the input element focused.

open fun focus(): Unit
(js)

getSnAttrs

Returns list of element attributes in the form of a List.

open fun getSnAttrs(): List<StringPair>
(js)

getSnClass

Returns list of CSS class names for current widget in the form of a List.

open fun getSnClass(): List<StringBoolPair>
(js)

getState

Get current state.

open fun getState(): Date?
(js)

getValueAsString

Returns the value of the date/time input as a String.

fun getValueAsString(): String?
(js)

render

Renders current component as a Snabbdom vnode.

open fun render(): VNode
(js)

subscribe

Subscribe for the state change notifications.

open fun subscribe(observer: (Date?) -> Unit): () -> Unit

Extension Properties

(js)

changeFlow

Extension property returning Flow for a change event.

val <T : Widget> T.changeFlow: Flow<T>
(js)

clickFlow

Extension property returning Flow for a click event.

val <T : Widget> T.clickFlow: Flow<T>
(js)

inputFlow

Extension property returning Flow for an input event.

val <T : Widget> T.inputFlow: Flow<T>
(js)

stateFlow

Extension property returning StateFlow for an ObservableState.

val <S> ObservableState<S>.stateFlow: StateFlow<S>

Extension Functions

(js)

addBsBgColor

fun Component.addBsBgColor(bsBgColor: BsBgColor): Unit
(js)

addBsBorder

fun Component.addBsBorder(vararg bsBorder: BsBorder): Unit
(js)

addBsClearfix

fun Component.addBsClearfix(): Unit
(js)

addBsColor

fun Component.addBsColor(bsColor: BsColor): Unit
(js)

addBsRounded

fun Component.addBsRounded(vararg bsRounded: BsRounded): Unit
(js)

bind

An extension function which binds the widget to the observable state.

fun <S, W : Widget> W.bind(observableState: ObservableState<S>, removeChildren: Boolean = true, factory: W.(S) -> Unit): W
(js)

contextMenu

DSL builder extension function.

fun Widget.contextMenu(fixedPosition: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (ContextMenu.() -> Unit)? = null): ContextMenu
(js)

enableGestureDetector

Enable gesture detector for a given Widget.

fun Widget.enableGestureDetector(): Unit
(js)

eventFlow

Extension property returning Flow<Pair<Widget, Event>> for a given event

fun <T : Widget> T.eventFlow(event: String): Flow<Pair<T, Event>>
(js)

onClick

An extension function for defining on click event handlers.

fun <T : Widget> T.onClick(handler: T.(MouseEvent) -> Unit): Int
(js)

onEvent

An extension function for defining event handlers.

fun <T : Widget> T.onEvent(block: SnOn<T>.() -> Unit): Int
(js)

removeBsBgColor

fun Component.removeBsBgColor(bsBgColor: BsBgColor): Unit
(js)

removeBsBorder

fun Component.removeBsBorder(vararg bsBorder: BsBorder): Unit
(js)

removeBsClearfix

fun Component.removeBsClearfix(): Unit
(js)

removeBsColor

fun Component.removeBsColor(bsColor: BsColor): Unit
(js)

removeBsRounded

fun Component.removeBsRounded(vararg bsRounded: BsRounded): Unit
(js)

setContextMenu

Sets context menu for the current widget.

fun Widget.setContextMenu(contextMenu: ContextMenu): Widget
(js)

style

DSL builder extension function.

fun Widget.style(className: String? = null, init: (Style.() -> Unit)? = null): Style