Caplin Trader 4.7.1

Class: module:caplin/fx/presenter/FxCalendarDateField

module:caplin/fx/presenter/FxCalendarDateField

Constructor

new module:caplin/fx/presenter/FxCalendarDateField(sInstrument, sNamespace, fReadyListeneropt)

Extends:
Parameters:
Name Type Attributes Description
sInstrument String The associated instrument, e.g. '/FX/USDCAD'
sNamespace String e.g. 'FwdTenor'
fReadyListener function <optional>
A callback function that is invoked after the field has obtained data from various services and is enabled

Extends

Members

controlName :br.presenter.property.WritableProperty

The logical control-name the field is being bound to — this value will appear within the name attribute if being bound to a native HTML control.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

currentMonth :br.presenter.property.WritableProperty

The current month displayed.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

currentYear :br.presenter.property.WritableProperty

The current year displayed
Type:
  • br.presenter.property.WritableProperty
Inherited From:

enabled :br.presenter.property.WritableProperty

A boolean property representing whether the input field is enabled or not.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

endDate :br.presenter.property.ISODateProperty

End of the date range for this field
Type:
  • br.presenter.property.ISODateProperty
Inherited From:

failureMessage :br.presenter.property.WritableProperty

A textual description of the currently failing validation message when #hasError is true.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

hasError :br.presenter.property.WritableProperty

A boolean property that is true if #value has any validation errors, and false otherwise.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

label :br.presenter.property.WritableProperty

The textual label associated with the input field.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

pending :br.presenter.property.WritableProperty

A boolean property that is true if #value is waiting for validation, and false otherwise.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

startDate :br.presenter.property.ISODateProperty

Start of the date range for this field
Type:
  • br.presenter.property.ISODateProperty
Inherited From:

tenor :module:br/presenter/property/WritableProperty

The current tenor property
Type:

tenors :module:br/presenter/node/NodeList

List of tenor nodes
Type:

validDatesForMonth :br.presenter.property.WritableProperty

The current valid dates is the displayed month.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

value :br.presenter.property.EditableProperty

The current value displayed within the input field.
Type:
  • br.presenter.property.EditableProperty
Inherited From:

visible :br.presenter.property.WritableProperty

A boolean property representing whether the input field is visible or not.
Type:
  • br.presenter.property.WritableProperty
Inherited From:

Methods

getPath()

Returns the path that would be required to bind this node from the view.

This method is used internally, but might also be useful in allowing the dynamic construction of views for arbitrary presentation models.

Inherited From:

getValidDatesForMonth()

Returns an array of integers, which are the valid dates for the current month.
Inherited From:

isValidTenor(sLabel) → {boolean}

Test if the given string label is a valid tenor.
Parameters:
Name Type Description
sLabel String the label to check
Returns:
True if the label is a valid tenor
Type
boolean

nodes(sNodeName, vProperties)

Returns all nested nodes matching the search criteria reachable from this node.

Care is taken not to search up the tree in cyclic presentation models (where some of the presentation nodes have back references to presentation nodes higher up in the tree).

Parameters:
Name Type Description
sNodeName String The name of nodes to match.
vProperties Object Only nodes having this array or map of properties will be matched.
Inherited From:
See:

properties(sPropertyName, vValue)

Returns all nested properties matching the search criteria reachable from this node.

Care is taken not to search up the tree in cyclic presentation models (where some of the presentation nodes have back references to presentation nodes higher up in the tree).

Parameters:
Name Type Description
sPropertyName String The name of properties to match.
vValue Object The value of properties to match.
Inherited From:
See:

removeAllListeners()

Inherited From:
Deprecated:
  • This method has been replaced by #removeChildListeners which recurses the node tree. Removes all listeners attached to the properties contained by this PresentationNode.

    removeChildListeners()

    Removes all listeners attached to the properties contained by this PresentationNode, and any nodes it contains.
    Inherited From:

    setAvailableDateStrategy(nStrategy)

    Sets the strategy of available dates.
    Parameters:
    Name Type Description
    nStrategy int one of the static constants (e.g. ALL_DAYS, or NO_DAYS) on this class.
    Inherited From: