Class ecm.widget.DatePicker


Extends idx.form.DateTextBox.
Provides a widget that is used to select a date. This class extends the idx.form.DateTextBox class to provide additional formatting patterns.
Defined in: <ecm\widget\DatePicker.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
Flag indicating validation messages should be displayed as dijit/Tooltip objects
 
Keep track of the initial value so we will pass that back to the server if the value isn't modified.
 
Override idx's default if showPickerIcon is false.
Fields borrowed from class idx.form._CompositeMixin:
fieldWidth, help, hint, hintPosition, label, labelWidth, unit

Method Summary

Method Attributes Method Name and Description
 
compare(val1, val2)
Overriding _DateTimeTextBox.compare() to properly compare null values; otherwise, selecting the current date will not fire an onChange event.
 
constructor(params)
 
displayMessage(message, force)
Displays a message for the control
 
 
getErrorMessage(isFocused)
Returns the error message.
 
Gets the date format pattern from the constraints.
 
Returns the date value.
 
Determines if the value is valid.
 
 
Sets the custom error message.
 
Uses formatLength "short" and fullYear false.
Methods borrowed from class idx.form._CompositeMixin:
_setHintAttr, _setLabelAlignmentAttr, _setLabelAttr, _setRequiredAttr, _setUnitAttr, resize, validateAndFocus

Constructor Detail

ecm.widget.DatePicker()

Field Detail

displayMessageAsTooltip

Flag indicating validation messages should be displayed as dijit/Tooltip objects

initialValue

Keep track of the initial value so we will pass that back to the server if the value isn't modified. Necessary because the control doesn't support seconds -- we need the complete value (including seconds) to pass compare tests in the server when saving.

showPickerIcon

Override idx's default if showPickerIcon is false.

Method Detail

compare(val1, val2)

Overriding _DateTimeTextBox.compare() to properly compare null values; otherwise, selecting the current date will not fire an onChange event.
Parameters:
val1
The first date value for the comparison.
val2
The second date value for the comparison.
Returns:
Returns 1 if val1 > val2, -1 if val1 < val2, and 0 if val1 equals val2.

constructor(params)

Parameters:
params

displayMessage(message, force)

Displays a message for the control
Parameters:
message
A String message to display
force
A Boolean indicating whether focus should be set to the message

getDateORTextValue()


getErrorMessage(isFocused)

Returns the error message.
Parameters:
isFocused
Boolean indicating if the widget is focused.
Returns:
The error message string.

getFormatPattern()

Gets the date format pattern from the constraints.
Returns:
The constraints date pattern.

getValue()

Returns the date value.
Returns:
The date value as an ISO string.

{Boolean} isValid()

Determines if the value is valid.
Returns:
{Boolean} A value of true if the value is valid, otherwise false.

postCreate()


setCustomValidationError(errorMessage)

Sets the custom error message.
Parameters:
errorMessage
The custom error message string.

startup()

Uses formatLength "short" and fullYear false.