Class: DateRestrictionValidator

Oracle® Fusion Middleware Oracle JavaScript Extension Toolkit (JET)
12c (12.1.4)

E54107-01

QuickNav

oj. DateRestrictionValidator

Constructor

new DateRestrictionValidator(options)

Constructs a DateRestrictionValidator that ensures the value provided is not in a disabled entry of dayMetaData
Parameters:
Name Type Argument Description
options Object <optional>
an object literal used to provide:

  • 'dayMetaData': Additional info to be used when rendering the day This should be in the following JSON format with the year, month, day based on Date.getFullYear(), Date.getMonth(), and Date.getDate(): {year: {month: {day: {disabled: true|false, className: "additionalCSS", tooltip: 'Stuff to display'}}}

  • 'message': an optional object literal of custom error message to be used:

    • messageDayMetaData: The detail error message to be used for constructing faces messages, if input value is in disabled entry of dayMetaData.

      Parameters:

      • {0} value entered by the user

      Usage: Entered {0} which is a disabled entry of dayMetaData.

Source:

Methods

_inDisabledMetaData(value) → {boolean}

Validates whether the date provided is part of disabled date within dayMetaData
Parameters:
Name Type Description
value Object that is being validated
Source:
Returns:
boolean of whether it is in disabled meta data
Type
boolean

Init(options)

Initializes validator instance with the set options
Parameters:
Name Type Argument Description
options Object <optional>
Source:

validate(value) → {Object}

Validates whether the date provided is part of disabled date within dayMetaData
Parameters:
Name Type Description
value Object that is being validated
Source:
Throws:
when there is no match
Type
Error
Returns:
original if validation was successful
Type
Object