Skip to main content

DateInput

Defined in: js-api/src/widgets/inputs.ts:22

Input control base. Could be used for editing Property values as well. The root is a div that consists of captionLabel and input.

Extends​

Constructors​

Constructor​

new DateInput(dart, onChanged?): DateInput

Defined in: js-api/src/widgets/inputs.ts:25

Parameters​

ParameterTypeDefault value
dartanyundefined
onChangedanynull

Returns​

DateInput

Overrides​

InputBase.constructor

Properties​

PropertyTypeOverridesDefined in
dartanyInputBase.dartjs-api/src/widgets/inputs.ts:23

Accessors​

caption​

Get Signature​

get caption(): string

Defined in: js-api/src/widgets/inputs-base.ts:56

Returns​

string

Set Signature​

set caption(s): void

Defined in: js-api/src/widgets/inputs-base.ts:59

Parameters​
ParameterType
sstring
Returns​

void

Inherited from​

InputBase.caption


captionLabel​

Get Signature​

get captionLabel(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:69

Returns​

HTMLElement

Inherited from​

InputBase.captionLabel


classList​

Get Signature​

get classList(): DOMTokenList

Defined in: js-api/src/widgets/inputs-base.ts:177

Returns​

DOMTokenList

Inherited from​

InputBase.classList


dataType​

Get Signature​

get dataType(): string

Defined in: js-api/src/widgets/inputs-base.ts:51

Data type this input can edit. See Type.

Returns​

string

Inherited from​

InputBase.dataType


enabled​

Get Signature​

get enabled(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:95

Whether the input is enabled

Returns​

boolean

Set Signature​

set enabled(v): void

Defined in: js-api/src/widgets/inputs-base.ts:96

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.enabled


format​

Get Signature​

get format(): string

Defined in: js-api/src/widgets/inputs-base.ts:66

Value format.

Returns​

string

Set Signature​

set format(s): void

Defined in: js-api/src/widgets/inputs-base.ts:67

Parameters​
ParameterType
sstring
Returns​

void

Inherited from​

InputBase.format


input​

Get Signature​

get input(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:72

Returns the actual input

Returns​

HTMLElement

Inherited from​

InputBase.input


inputType​

Get Signature​

get inputType(): string

Defined in: js-api/src/widgets/inputs-base.ts:46

Input type identifier (such as "Slider" for the slider input). See InputType.

Returns​

string

Inherited from​

InputBase.inputType


notify​

Get Signature​

get notify(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:79

Whether events are thrown on value set

Returns​

boolean

Set Signature​

set notify(v): void

Defined in: js-api/src/widgets/inputs-base.ts:80

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.notify


nullable​

Get Signature​

get nullable(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:75

Whether empty values are allowed

Returns​

boolean

Set Signature​

set nullable(v): void

Defined in: js-api/src/widgets/inputs-base.ts:76

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.nullable


onChanged​

Get Signature​

get onChanged(): Observable<T>

Defined in: js-api/src/widgets/inputs-base.ts:103

Occurs when [value] is changed, either by user or programmatically.

Returns​

Observable<T>

Inherited from​

InputBase.onChanged


onInput​

Get Signature​

get onInput(): Observable<Event>

Defined in: js-api/src/widgets/inputs-base.ts:106

Occurs when [value] is changed by user.

Returns​

Observable<Event>

Inherited from​

InputBase.onInput


onValidated​

Get Signature​

get onValidated(): Observable<string[]>

Defined in: js-api/src/widgets/inputs-base.ts:118

Occurs after each validation run, with the resulting messages.

Returns​

Observable<string[]>

Inherited from​

InputBase.onValidated


property​

Get Signature​

get property(): any

Defined in: js-api/src/widgets/inputs-base.ts:62

Property if associated with

Returns​

any

Set Signature​

set property(p): void

Defined in: js-api/src/widgets/inputs-base.ts:63

Parameters​
ParameterType
pProperty
Returns​

void

Inherited from​

InputBase.property


readOnly​

Get Signature​

get readOnly(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:91

Whether the input is readonly

Returns​

boolean

Set Signature​

set readOnly(v): void

Defined in: js-api/src/widgets/inputs-base.ts:92

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.readOnly


root​

Get Signature​

get root(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:54

Visual root (typically a div element that contains caption and input)

Returns​

HTMLElement

Inherited from​

InputBase.root


stringValue​

Get Signature​

get stringValue(): string

Defined in: js-api/src/widgets/inputs-base.ts:87

String representation of the value

Returns​

string

Set Signature​

set stringValue(s): void

Defined in: js-api/src/widgets/inputs-base.ts:88

Parameters​
ParameterType
sstring
Returns​

void

Inherited from​

InputBase.stringValue


validationResults​

Get Signature​

get validationResults(): string[]

Defined in: js-api/src/widgets/inputs-base.ts:109

Messages of the current validation results (empty when the input is valid).

Returns​

string[]

Inherited from​

InputBase.validationResults


validity​

Get Signature​

get validity(): string | null

Defined in: js-api/src/widgets/inputs-base.ts:112

Current validation message(s), or null when the input is valid.

Returns​

string | null

Inherited from​

InputBase.validity


value​

Get Signature​

get value(): Dayjs | null

Defined in: js-api/src/widgets/inputs.ts:29

Input value

Returns​

Dayjs | null

Set Signature​

set value(x): void

Defined in: js-api/src/widgets/inputs.ts:33

Input value

Parameters​
ParameterType
xDayjs | null
Returns​

void

Overrides​

InputBase.value


visible​

Get Signature​

get visible(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:99

Whether the input is visible. When set, also updates the visibility of its category header.

Returns​

boolean

Set Signature​

set visible(v): void

Defined in: js-api/src/widgets/inputs-base.ts:100

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.visible

Methods​

addCaption()​

addCaption(caption): InputBase<Dayjs | null>

Defined in: js-api/src/widgets/inputs-base.ts:143

Adds the specified caption

Parameters​

ParameterType
captionstring

Returns​

InputBase<Dayjs | null>

Inherited from​

InputBase.addCaption


addOptions()​

addOptions(options): InputBase<Dayjs | null>

Defined in: js-api/src/widgets/inputs-base.ts:155

Adds the specified options

Parameters​

ParameterType
optionsHTMLElement

Returns​

InputBase<Dayjs | null>

Inherited from​

InputBase.addOptions


addPatternMenu()​

addPatternMenu(pattern): void

Defined in: js-api/src/widgets/inputs-base.ts:161

Adds a usage example to the input's hamburger menu

Parameters​

ParameterType
patternany

Returns​

void

Inherited from​

InputBase.addPatternMenu


addPostfix()​

addPostfix(postfix): InputBase<Dayjs | null>

Defined in: js-api/src/widgets/inputs-base.ts:149

Adds the specified postfix

Parameters​

ParameterType
postfixstring

Returns​

InputBase<Dayjs | null>

Inherited from​

InputBase.addPostfix


addValidator()​

addValidator(validator): void

Defined in: js-api/src/widgets/inputs-base.ts:167

Adds a validator that accepts a string representation of the edited value and returns null if valid, or error message if invalid

Parameters​

ParameterType
validator(value) => string | null

Returns​

void

Inherited from​

InputBase.addValidator


fireChanged()​

fireChanged(): any

Defined in: js-api/src/widgets/inputs-base.ts:133

Fires the 'changed' event (value has changed). See also fireInput

Returns​

any

Inherited from​

InputBase.fireChanged


fireInput()​

fireInput(): any

Defined in: js-api/src/widgets/inputs-base.ts:138

Fires the 'input' event (user input). See also fireChanged

Returns​

any

Inherited from​

InputBase.fireInput


init()​

init(): any

Defined in: js-api/src/widgets/inputs-base.ts:128

Returns​

any

Inherited from​

InputBase.init


load()​

load(s): any

Defined in: js-api/src/widgets/inputs-base.ts:126

Loads the value. Used in dialog history. See also load

Parameters​

ParameterType
sany

Returns​

any

Inherited from​

InputBase.load


save()​

save(): any

Defined in: js-api/src/widgets/inputs-base.ts:121

Saves the value. Used in dialog history. See also load

Returns​

any

Inherited from​

InputBase.save


setTooltip()​

setTooltip(msg, tooltipCheck?): InputBase<Dayjs | null>

Defined in: js-api/src/widgets/inputs-base.ts:172

Sets the tooltip

Parameters​

ParameterTypeDefault value
msgstringundefined
tooltipCheck(() => boolean) | nullnull

Returns​

InputBase<Dayjs | null>

Inherited from​

InputBase.setTooltip


validate()​

validate(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:183

Performs immediate validation of the input and returns the result.

Returns​

boolean

True if the input is valid; otherwise, false.

Inherited from​

InputBase.validate


forColumn()​

static forColumn<T>(column): InputBase<T | null>

Defined in: js-api/src/widgets/inputs-base.ts:41

Creates input for the specified column

Type Parameters​

Type ParameterDefault type
Tany

Parameters​

ParameterType
columnColumn<T>

Returns​

InputBase<T | null>

Inherited from​

InputBase.forColumn


forInputType()​

static forInputType(inputType): InputBase

Defined in: js-api/src/widgets/inputs-base.ts:36

Creates input for the specified input type

Parameters​

ParameterType
inputTypestring | InputType

Returns​

InputBase

Inherited from​

InputBase.forInputType


forProperty()​

static forProperty(property, source?): InputBase

Defined in: js-api/src/widgets/inputs-base.ts:31

Creates input for the specified property, and optionally binds it to the specified object

Parameters​

ParameterTypeDefault value
propertyPropertyundefined
sourceanynull

Returns​

InputBase

Inherited from​

InputBase.forProperty