class DateTimeEditWidget view source

DateTimeEdit widget.

Constructor

new DateTimeEditWidget()

Instance members

addClass(className : string)
[inherits from WidgetBase]

Add the given class to element

Parameters

className string class to add

detach()
[inherits from WidgetBase]

Detach the widget from the dom

emit(type : string, arguments… : any)
[inherits from EventListener]

Emit an event

Parameters

type string event type to emit
arguments any arguments (excluding type) will be set in event.data

getApplicationIdentifier() : (string)
[inherits from WidgetBase]

Get the unique identifier of the application

Returns

(string) the unique identifier of the application

getApplicationWidget() : (ApplicationWidget)
[inherits from WidgetBase]

Get Application Widget related to the widget

Returns

(ApplicationWidget) ApplicationWidget

getBackgroundColor() : (string)
[inherits from ColoredWidgetBase]

Returns the background color

Returns

(string) a color definition as an RGB function ('rgb(128, 255, 0)')

getBuildParameters() : (Object)
[inherits from WidgetBase]

Returns build parameters

Returns

(Object) build parameters

getClassName() : (string)
[inherits from WidgetBase]

Get the main class name of the widget

Returns

(string) the main class name

getColor() : (string)
[inherits from ColoredWidgetBase]

Returns the fore color

Returns

(string) a color definition as an RGB function ('rgb(128, 255, 0)')

getColorFromStyle() : (string)
[inherits from ColoredWidgetBase]

Returns the fore color (directly from style css)

Returns

(string) a color definition as an RGB function ('rgb(128, 255, 0)')

getCursors() : (Object)
[inherits from DateEditWidgetBase]

Get cursors

Returns

(Object) object with cursors

getDate() : (Object)
[inherits from DateEditWidgetBase]

Return the current Date object

Returns

(Object) returns current dayjs date object

getDialogType() : (string)
[inherits from WidgetBase]

return widget current dialog type

Returns

(string) values can be : Input, InputArray, Display, DisplayArray or Construct

getDisabledDays() : (Array)
[inherits from DateEditWidget]

Return calendar disabled days list

Returns

(Array) Array of days that are disabled

getElement() : (HTMLElement)
[inherits from WidgetBase]

Get the root element of the widget

Returns

(HTMLElement) the root element of the widget

getEnd() : (string)
[inherits from WidgetBase]

Get end (for reversed mode)

Returns

(string) end keyword for rtl

getFirstDayOfWeek() : (string)
[inherits from DateEditWidget]

Returns first day of the week name

Returns

(string) English name of the currently set first day of the week

getFontColor() : (string)
[inherits from TextWidgetBase]

Get the font color used by this widget

Returns

(string) a CSS font color value

getFontFamily() : (string)
[inherits from TextWidgetBase]

Get the font-family used by this widget

Returns

(string) the used font family

getFontSize() : (string)
[inherits from TextWidgetBase]

Get the font-size used by this widget

Returns

(string) a CSS font size value

getFontStyle() : (string)
[inherits from TextWidgetBase]

Get the font-style used by this widget

Returns

(string) a CSS font style value

getFontWeight() : (string)
[inherits from TextWidgetBase]

Get the font-family used by this widget

Returns

(string) a CSS font weight value

getFormat() : (string)
[inherits from DateEditWidgetBase]

Return date format

Returns

(string) the date format

getFormWidget() : (FormWidget)
[inherits from WidgetBase]

Get the Form Widget related to the widget

Returns

(FormWidget) FormWidget

getInputElement() : (HTMLElement)
[inherits from FieldWidgetBase]

Get the input part of the widget

Returns

(HTMLElement) the input part of the widget

getLayoutEngine() : (LayoutEngineBase)
[inherits from WidgetBase]

Get the widget's layout engine

Returns

(LayoutEngineBase) the widget's layout engine

getLayoutInformation() : (LayoutInformation)
[inherits from WidgetBase]

Get the widget's layout information

Returns

(LayoutInformation) the widget's layout information

getMaxLength() : (number)
[inherits from DateEditWidgetBase]

Get the maximum number of characters allowed

Returns

(number) the maximum number of characters allowed in the field

getName() : (string)
[inherits from WidgetBase]

Get the name of the widget class

Returns

(string) the widget class name

getParentWidget(type : any) : (WidgetGroupBase)
[inherits from WidgetBase]

Get the parent widget

Parameters

type any class name to look for

Returns

(WidgetGroupBase) the parent widget

getStart() : (string)
[inherits from WidgetBase]

Get start (for reversed mode)

Returns

(string) start keyword for rtl

getStretchableScrollGridWidgetBase() : (StretchableScrollGridWidgetBase)
[inherits from WidgetBase]

Get the stretchable scrollgrid Widget base class related to the widget

Returns

(StretchableScrollGridWidgetBase) StretchableScrollGridWidgetBase

getStyle(selector : string, property : string, appliesOnRoot : boolean) : (any)
[inherits from WidgetBase]

Get widget style property value

Parameters

selector string additional sub selector
property string property name
appliesOnRoot boolean true if the returned selector should match the root too.

Returns

(any) property value if set, undefined otherwise

getTableWidgetBase() : (TableWidgetBase)
[inherits from WidgetBase]

Get the table Widget base class related to the widget

Returns

(TableWidgetBase) TableWidgetBase

getTextAlign() : (string)
[inherits from TextWidgetBase]

Get the text-align used by this widget

Returns

(string) a text alignment

getTextDecoration() : (string)
[inherits from TextWidgetBase]

Get the text-decoration used by this widget

Returns

(string) a CSS text decoration

getTextTransform() : (string)
[inherits from TextWidgetBase]

Get the text-transform used by this widget

Returns

(string) a CSS text transform

getTitle() : (string)
[inherits from WidgetBase]

Get the title of the widget

Returns

(string) the tooltip text

getUniqueIdentifier() : (string)
[inherits from WidgetBase]

Get the unique identifier of the widget

Returns

(string) the unique identifier of the widget

getUserInterfaceWidget() : (UserInterfaceWidget)
[inherits from WidgetBase]

Get the UI widget related to the widget

Returns

(UserInterfaceWidget) UserInterfaceWidget

getWindowWidget() : (WindowWidget)
[inherits from WidgetBase]

Get the Window Widget related to the widget

Returns

(WindowWidget) WindowWidget

hasClass(className : string)
[inherits from WidgetBase]

Checks if the widget element has the given class

Parameters

className string class to check

hasDOMFocus() : (boolean)
[inherits from FieldWidgetBase]

Tests if the widget has really the DOM focus (check document.activeElement)

Returns

(boolean) true if the widget has the DOM focus

hasFocus() : (boolean)
[inherits from WidgetBase]

Check if widget node has focus (class gbc_Focus)

Returns

(boolean) true if widget node has focus

hasInputElement() : (boolean)
[inherits from FieldWidgetBase]

Check if the widget has an input element

Returns

(boolean) true if widget has an input element

hasVMFocus() : (boolean)
[inherits from WidgetBase]

Check if widget node has VM focus

Returns

(boolean) true if widget node has VM focus

ignoreLayout() : (boolean)
[inherits from WidgetBase]

Does the widget ignore layouting

Returns

(boolean) true if the widget ignore all layout.

initDatePicker()
[inherits from DateEditWidget]

Create the calendar object component and bind it on the input field

isChildOf(parent : WidgetBase) : (boolean)
[inherits from WidgetBase]

Check if this widget is a child of a given one

Parameters

parent WidgetBase the reference parent widget

Returns

(boolean) true if is a child, false otherwise

isDestroyed() : (boolean)
[inherits from EventListener]

Returns if the node is destroyed

Returns

(boolean) true if node is destroyed

isEnabled() : (boolean)
[inherits from WidgetBase]

Check if widget is enabled

Returns

(boolean) true if the widget allows user interaction, false otherwise.

isFocusable() : (boolean)
[inherits from FieldWidgetBase]

Returns if the widget is focusable

Returns

(boolean) State of focusable

isHidden() : (boolean)
[inherits from WidgetBase]

Check if the widget is hidden

Returns

(boolean) true if the widget is hidden, false otherwise

isInMatrix() : (boolean)
[inherits from WidgetBase]

Check if the widget is in a matrix

Returns

(boolean) true if the widget is in a matrix, false otherwise.

isInScrollGrid(scrollGrid : StretchableScrollGridWidgetBase) : (boolean)
[inherits from WidgetBase]

Check if the widget is in a scrollGrid

Parameters

scrollGrid StretchableScrollGridWidgetBase specific scrollGrid, if null just return if widget is in any scrollGrid

Returns

(boolean) true if the widget is in a table, false otherwise.

isInTable(table : TableWidgetBase) : (boolean)
[inherits from WidgetBase]

Check if the widget is in a table

Parameters

table TableWidgetBase specific table, if null just return if widget is in any table

Returns

(boolean) true if the widget is in a table, false otherwise.

isModal() : (boolean)
[inherits from DateEditWidget]

Return calendar type

Returns

(boolean) true if calendar has modal style

isNoBorder() : (boolean)
[inherits from WidgetBase]

Check if the widget is displayed without border

Returns

(boolean) true if the widget has no border class, false otherwise

isReadOnly() : (boolean)
[inherits from FieldWidgetBase]

Check if the widget is readonly or not

Returns

(boolean) true if the widget is readonly, false otherwise

isReversed() : (boolean)
[inherits from WidgetBase]

Check if arabic mode is enabled

Returns

(boolean) true if enabled

isVisible() : (boolean)
[inherits from WidgetBase]

Check if the widget is visible

Returns

(boolean) true if visible, false otherwise

loseFocus()
[inherits from WidgetBase]

Called before setFocus to notify previous focused widget

loseVMFocus(vmNewFocusedWidget : WidgetBase)
[inherits from WidgetBase]

Called before setting VM focus to notify previous VM focused widget

Parameters

vmNewFocusedWidget WidgetBase new widget which get the focus

removeClass(className : string)
[inherits from WidgetBase]

Remove the given class from element

Parameters

className string class to delete

removeTextTransform()
[inherits from TextWidgetBase]

Remove both class which cause text-transform

replaceWith(widget : WidgetBase)
[inherits from WidgetBase]

Replace the current widget with a given one

Parameters

widget WidgetBase the new widget

selectAllInputText()
[inherits from FieldWidgetBase]

Select all the text in the input element

setBackgroundColor(color : string, notImportant : boolean)
[inherits from ColoredWidgetBase]

Sets the background color

Parameters

color string a CSS color definition. Can be a color name ('red', 'blue'), an hex code ('#f5d48a') or a color function ('rgb(128, 255, 0)') null restores the default value.
notImportant boolean Set the CSS color definition on the ID whithout '!important'.

setCalendarType(calendarType : string)
[inherits from DateEditWidget]

Set calendar type. By default modal type (4ST style) is used.

Parameters

calendarType string calendar type

setColor(color : string)
[inherits from ColoredWidgetBase]

Set the fore color

Parameters

color string a CSS color definition. Can be a color name ('red', 'blue'), an hex code ('#f5d48a') or a color function ('rgb(128, 255, 0)'). null restores the default value.

setCursors(cursor : number, cursor2 : number)
[inherits from DateEditWidgetBase]

Place the cursor at the given position,

Parameters

cursor number first cursor position
cursor2 number second cursor position

setDate(date : string)
[inherits from DateEditWidget]

Generate dayjs date object from a string and set it for both the calendar component and the input field

Parameters

date string date value in string format

setDialogType(dialogType : string)
[inherits from WidgetBase]

Set widget current dialog type. Can be Input, Input Array, Display, Display Array or Construct

Parameters

dialogType string Dialog type

setDisabledDays(disabledDays : string)
[inherits from DateEditWidget]

Define disabled day of the calendar

Parameters

disabledDays string names separated with whitespace

setEditing(editing : boolean)
[inherits from FieldWidgetBase]

Flag or unflag widget as having value pending changes

Parameters

editing boolean the new editing state

setEnabled(enabled : boolean)
[inherits from FieldWidgetBase]

Defines the enabled status of the widget

Parameters

enabled boolean true if the widget allows user interaction, false otherwise.

setFirstDayOfWeek(firstDayOfWeek : string)
[inherits from DateEditWidget]

Define first day of the week of the calendar

Parameters

firstDayOfWeek string Localized name of the day to set as first day of the week

setFocus(fromMouse : boolean, stayOnSameWidget : boolean)
[inherits from WidgetBase]

Called when widget obtains the focus

Parameters

fromMouse boolean true if focus comes from mouse event
stayOnSameWidget boolean true if we want to set the focus to the current focused widget

setFocusable(focusable : boolean)
[inherits from WidgetBase]

Defines if the widget is focusable

Parameters

focusable boolean State of focusable

setFontColor() : (string)
[inherits from TextWidgetBase]

Set the font color used by this widget

Returns

(string) a CSS font color value

setFontFamily(fontFamily : string)
[inherits from TextWidgetBase]

Set the font-family used for this widget

Parameters

fontFamily string the font family to use. null restores the default value.

setFontSize(size : string)
[inherits from TextWidgetBase]

Set the font-size used for this widget

Parameters

size string a CSS font size value. null restores the default value.

setFontStyle(style : string)
[inherits from TextWidgetBase]

Set the font-style used for this widget

Parameters

style string a CSS font style value. null restores the default value.

setFontWeight(weight : string)
[inherits from TextWidgetBase]

Set the font weight used for this widget

Parameters

weight string a CSS font weight value. null restores the default value.

setHidden(hidden : boolean)
[inherits from WidgetBase]

Defines if the widget should be hidden or not

Parameters

hidden boolean true if the widget is hidden, false otherwise

setMaxLength(maxlength : number)
[inherits from DateEditWidget]

Define the maximum number of characters allowed

Parameters

maxlength number maximum number of characters allowed in the field

setNoBorder(noBorder : boolean)
[inherits from WidgetBase]

Remove or add borders to the widget

Parameters

noBorder boolean true if the widget has no border class, false otherwise

setParentWidget(widget : WidgetGroupBase, options : Object)
[inherits from WidgetBase]

Defines the parent widget

Parameters

widget WidgetGroupBase the widget to use as parent
options Object possible options
options.noLayoutInvalidation boolean won't affect parent layout

setPlaceHolder(placeholder : string, fake : boolean)
[inherits from FieldWidgetBase]

Defines a placeholder text

Parameters

placeholder string placeholder text
fake boolean true if placeholder come from another attribute

setReadOnly(readonly : boolean)
[inherits from FieldWidgetBase]

Define the widget as readonly or not

Parameters

readonly boolean true to set the widget as readonly without possibility of edition, false otherwise

setReverse(rtl : boolean)
[inherits from WidgetBase]

Set Arabic mode

Parameters

rtl boolean true if widget is right to left

setStyle(selector : string|Object, style : Object)
[inherits from WidgetBase]

Updates widget style with new rules

Parameters

selector string|Object additional sub selector
style Object style properties to set

setTextAlign(align : string)
[inherits from TextWidgetBase]

Set the text-align used for this widget

Parameters

align string a CSS text alignment. null restores the default value.

setTextDecoration()
[inherits from TextWidgetBase]

Set the text-decoration used for this widget

setTextTransform(transform : string)
[inherits from TextWidgetBase]

Set the text-transform used for this widget

Parameters

transform string a CSS text transform. null restores the default value.

setTitle(title : string)
[inherits from WidgetBase]

Set the title of the widget

Parameters

title string the tooltip text

setValue(value : string|number, fromVM : boolean)
[inherits from FieldWidgetBase]

Set the value of widget

Parameters

value string|number sets the value to display
fromVM boolean true if value comes from the VM

showWeekNumber(show : boolean)
[inherits from DateEditWidget]

Display or hide week number

Parameters

show boolean if true display week number, hide otherwise

toggleClass(className : string, className2 : string|boolean, switcher : boolean)
[inherits from WidgetBase]

Toggle the given class to element

Parameters

className string class to toggle
className2 string|boolean class added if switcher is false
switcher boolean forced new state

translate()
[inherits from WidgetBase]

Translate the widget

when(type : string, handler : Hook, once : boolean) : (HandleRegistration)
[inherits from EventListener]

Registers a handler for this event type

Parameters

type string event type (e.g. "attribute changed")
handler Hook handler to trigger when the event type is emitted
once boolean if true, will only fire once

Returns

(HandleRegistration) a registration handle (for unbind purpose)