Module

RMP_TextInput

Methods

# inner getDate() → {string}

Returns the date field of the Date input widget.
string

# inner getDefaultValue() → {string}

Returns the default value of the widget.
string

# inner getNumber() → {number}

Returns the number field of the Number input widget.
number

# inner getPatternWarning() → {string}

Returns the pattern warning of the widget.
string

# inner getText() → {string}

Returns the text value of the widget.
string

# inner getTextType() → {string}

Returns the text type of the widget.
string

# inner getType() → {string}

Returns the type of the widget (RMP_TextInput)
string

# inner isFollowKeyPressEnabled() → {boolean}

Returns true if the Keypress field is enabled, otherwise false.
boolean

# inner setCustomDateHandler(dateHandeler)

Adds a custom handler to compute the date selected or entered by the end user before setting the variable of the Date input widget. By default, the offset time is set to UTC 12:00. If a custom handler is configured, it affects all the Date input widgets of the web interface.
Parameters:
Name Type Description
dateHandeler customDateHandeler
Example
RMP_TextInput.prototype.setCustomDateHandler(function(selectedDate){
 var computedDate = new Date(selectedDate.getTime());
 computedDate.setHours(12);
    computedDate.setMinutes(0);
    computedDate.setSeconds(0);
    return computedDate;
 })

# inner setDate(date)

Sets the date field (text) of the Date input widget.
Parameters:
Name Type Description
date string Date to set

# inner setFollowKeyPressEnabled(enabled)

Enables or disables the Keypress field.
Parameters:
Name Type Description
enabled boolean

# inner setNumber(number)

Sets the number field (text) of the Number input widget.
Parameters:
Name Type Description
number number Number to set

# inner setPatternWarning(warning)

Sets the pattern warning of the widget.
Parameters:
Name Type Description
warning string Warning to set

# inner setText(text)

Sets the text field of the widget.
Parameters:
Name Type Description
text string Text to set

Type Definitions

# customDateHandeler(date) → {object}

Updates the default behavior on computing the return date (including the time) after the end user has entered a date (without time) in the Date input widget.
Parameters:
Name Type Description
date object Selected or entered date
Computed date
object