Skip to main content

Class: DateInput

dg.DateInput

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

Hierarchy

Constructors

constructor

new DateInput(dart, onChanged?)

Parameters

NameTypeDefault value
dartanyundefined
onChangedanynull

Overrides

InputBase.constructor

Defined in

src/widgets.ts:1244

Properties

dart

dart: any

Overrides

InputBase.dart

Defined in

src/widgets.ts:1242

Accessors

caption

get caption(): string

Returns

string

Inherited from

InputBase.caption

Defined in

src/widgets.ts:1058

set caption(s): void

Parameters

NameType
sstring

Returns

void

Inherited from

InputBase.caption

Defined in

src/widgets.ts:1061


captionLabel

get captionLabel(): HTMLElement

Returns

HTMLElement

Inherited from

InputBase.captionLabel

Defined in

src/widgets.ts:1071


classList

get classList(): DOMTokenList

Returns

DOMTokenList

Inherited from

InputBase.classList

Defined in

src/widgets.ts:1167


dataType

get dataType(): string

Data type this input can edit. See Type.

Returns

string

Inherited from

InputBase.dataType

Defined in

src/widgets.ts:1053


enabled

get enabled(): boolean

Whether the input is enabled

Returns

boolean

Inherited from

InputBase.enabled

Defined in

src/widgets.ts:1097

set enabled(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.enabled

Defined in

src/widgets.ts:1098


format

get format(): string

Value format.

Returns

string

Inherited from

InputBase.format

Defined in

src/widgets.ts:1068

set format(s): void

Parameters

NameType
sstring

Returns

void

Inherited from

InputBase.format

Defined in

src/widgets.ts:1069


input

get input(): HTMLElement

Returns the actual input

Returns

HTMLElement

Inherited from

InputBase.input

Defined in

src/widgets.ts:1074


inputType

get inputType(): string

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

Returns

string

Inherited from

InputBase.inputType

Defined in

src/widgets.ts:1048


notify

get notify(): boolean

Whether events are thrown on value set

Returns

boolean

Inherited from

InputBase.notify

Defined in

src/widgets.ts:1081

set notify(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.notify

Defined in

src/widgets.ts:1082


nullable

get nullable(): boolean

Whether empty values are allowed

Returns

boolean

Inherited from

InputBase.nullable

Defined in

src/widgets.ts:1077

set nullable(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.nullable

Defined in

src/widgets.ts:1078


property

get property(): any

Property if associated with

Returns

any

Inherited from

InputBase.property

Defined in

src/widgets.ts:1064

set property(p): void

Parameters

NameType
pProperty

Returns

void

Inherited from

InputBase.property

Defined in

src/widgets.ts:1065


readOnly

get readOnly(): boolean

Whether the input is readonly

Returns

boolean

Inherited from

InputBase.readOnly

Defined in

src/widgets.ts:1093

set readOnly(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.readOnly

Defined in

src/widgets.ts:1094


root

get root(): HTMLElement

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

Returns

HTMLElement

Inherited from

InputBase.root

Defined in

src/widgets.ts:1056


stringValue

get stringValue(): string

String representation of the value

Returns

string

Inherited from

InputBase.stringValue

Defined in

src/widgets.ts:1089

set stringValue(s): void

Parameters

NameType
sstring

Returns

void

Inherited from

InputBase.stringValue

Defined in

src/widgets.ts:1090


value

get value(): null | Dayjs

Input value

Returns

null | Dayjs

Overrides

InputBase.value

Defined in

src/widgets.ts:1248

set value(x): void

Parameters

NameType
xnull | Dayjs

Returns

void

Overrides

InputBase.value

Defined in

src/widgets.ts:1252

Methods

addCaption

addCaption(caption): InputBase<null | Dayjs>

Adds the specified caption

Parameters

NameType
captionstring

Returns

InputBase<null | Dayjs>

Inherited from

InputBase.addCaption

Defined in

src/widgets.ts:1133


addOptions

addOptions(options): InputBase<null | Dayjs>

Adds the specified options

Parameters

NameType
optionsHTMLElement

Returns

InputBase<null | Dayjs>

Inherited from

InputBase.addOptions

Defined in

src/widgets.ts:1145


addPatternMenu

addPatternMenu(pattern): void

Adds a usage example to the input's hamburger menu

Parameters

NameType
patternany

Returns

void

Inherited from

InputBase.addPatternMenu

Defined in

src/widgets.ts:1151


addPostfix

addPostfix(postfix): InputBase<null | Dayjs>

Adds the specified postfix

Parameters

NameType
postfixstring

Returns

InputBase<null | Dayjs>

Inherited from

InputBase.addPostfix

Defined in

src/widgets.ts:1139


addValidator

addValidator(validator): void

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

Parameters

NameType
validator(value: string) => null | string

Returns

void

Inherited from

InputBase.addValidator

Defined in

src/widgets.ts:1157


fireChanged

fireChanged(): any

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

Returns

any

Inherited from

InputBase.fireChanged

Defined in

src/widgets.ts:1123


fireInput

fireInput(): any

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

Returns

any

Inherited from

InputBase.fireInput

Defined in

src/widgets.ts:1128


init

init(): any

Returns

any

Inherited from

InputBase.init

Defined in

src/widgets.ts:1118


load

load(s): any

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

Parameters

NameType
sany

Returns

any

Inherited from

InputBase.load

Defined in

src/widgets.ts:1116


onChanged

onChanged(callback): StreamSubscription

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

Parameters

NameType
callbackFunction

Returns

StreamSubscription

Inherited from

InputBase.onChanged

Defined in

src/widgets.ts:1101


onInput

onInput(callback): StreamSubscription

Occurs when [value] is changed by user.

Parameters

NameType
callbackFunction

Returns

StreamSubscription

Inherited from

InputBase.onInput

Defined in

src/widgets.ts:1106


save

save(): any

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

Returns

any

Inherited from

InputBase.save

Defined in

src/widgets.ts:1111


setTooltip

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

Sets the tooltip

Parameters

NameTypeDefault value
msgstringundefined
tooltipChecknull | () => booleannull

Returns

InputBase<null | Dayjs>

Inherited from

InputBase.setTooltip

Defined in

src/widgets.ts:1162


forColumn

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

Creates input for the specified column

Type parameters

NameType
Tany

Parameters

NameType
columnColumn<T>

Returns

InputBase<null | T>

Inherited from

InputBase.forColumn

Defined in

src/widgets.ts:1043


forInputType

Static forInputType(inputType): InputBase<any>

Creates input for the specified input type

Parameters

NameType
inputTypestring | InputType

Returns

InputBase<any>

Inherited from

InputBase.forInputType

Defined in

src/widgets.ts:1038


forProperty

Static forProperty(property, source?): InputBase<any>

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

Parameters

NameTypeDefault value
propertyPropertyundefined
sourceanynull

Returns

InputBase<any>

Inherited from

InputBase.forProperty

Defined in

src/widgets.ts:1033