Skip to content

@serenity-is/sleekgrid / DateCellEdit

Class: DateCellEdit

Defined in: src/editors/editors.tsx:218

Date editor extending TextCellEdit with a jQuery UI datepicker. Manages calendar open/close and repositions via DateCellEdit.position.

Extends

Constructors

Constructor

new DateCellEdit(args): DateCellEdit

Defined in: src/editors/editors.tsx:13

Parameters

args

EditorOptions

Returns

DateCellEdit

Inherited from

TextCellEdit.constructor

Properties

_args

protected _args: EditorOptions

Defined in: src/editors/editors.tsx:11

Inherited from

TextCellEdit._args


_defaultValue

protected _defaultValue: any

Defined in: src/editors/editors.tsx:10

Inherited from

TextCellEdit._defaultValue


_input

_input: HTMLInputElement

Defined in: src/editors/editors.tsx:110

Inherited from

TextCellEdit._input

Methods

applyValue()

applyValue(item, state): void

Defined in: src/editors/editors.tsx:73

Writes the serialized value back to the data item's field.

Parameters

item

any

Row data item to mutate.

state

any

Value returned by BaseCellEdit.serializeValue.

Returns

void

Inherited from

TextCellEdit.applyValue


destroy()

destroy(): void

Defined in: src/editors/editors.tsx:243

Removes the editor input from the DOM.

Returns

void

Overrides

TextCellEdit.destroy


focus()

focus(): void

Defined in: src/editors/editors.tsx:27

Focuses the editor's input element.

Returns

void

Inherited from

TextCellEdit.focus


getValue()

getValue(): string

Defined in: src/editors/editors.tsx:35

Reads the current input value as a string.

Returns

string

Raw string value from the input.

Inherited from

TextCellEdit.getValue


hide()

hide(): void

Defined in: src/editors/editors.tsx:258

Returns

void


init()

init(): void

Defined in: src/editors/editors.tsx:221

Creates and attaches the editor DOM; called by the constructor.

Returns

void

Overrides

TextCellEdit.init


isValueChanged()

isValueChanged(): boolean

Defined in: src/editors/editors.tsx:81

Tests whether the editor content differs from the loaded default.

Returns

boolean

true if the value has changed.

Inherited from

TextCellEdit.isValueChanged


loadValue()

loadValue(item): void

Defined in: src/editors/editors.tsx:51

Loads the item's field value into the editor and selects it.

Parameters

item

any

Row data item whose field is being edited.

Returns

void

Inherited from

TextCellEdit.loadValue


position()

position(position): void

Defined in: src/editors/editors.tsx:265

Parameters

position

Position

Returns

void


serializeValue()

serializeValue(): any

Defined in: src/editors/editors.tsx:64

Serializes the current input value for commit.

Returns

any

String content of the input.

Inherited from

TextCellEdit.serializeValue


setValue()

setValue(val): void

Defined in: src/editors/editors.tsx:43

Writes a string value into the input.

Parameters

val

string

Value to set; null/undefined becomes empty string.

Returns

void

Inherited from

TextCellEdit.setValue


show()

show(): void

Defined in: src/editors/editors.tsx:251

Returns

void


validate()

validate(): ValidationResult

Defined in: src/editors/editors.tsx:89

Validates the current value using the column's validator, if any.

Returns

ValidationResult

Validation result; always valid when no validator is configured.

Inherited from

TextCellEdit.validate