Summary

Tag Name:af:validateDateTimeRange>
Type:oracle.adf.rich.DateTimeRange

Validate that the date entered is within a given range.

This validator provides hints for the help framework, which cannot be turned off.

This validator also runs on the client (implements org.apache.myfaces.trinidad.validator.ClientValidator).

Code Example(s)

<af:inputDate id="mdf3" value="#{date.date3}" label="max validator">
  <af:validateDateTimeRange maximum="#{date.maxDate}"/>
</af:inputDate>

<af:inputDate id="mdf3" value="2004-11-25"
              tip="min=2004-11-16  max=2004-12-16"
              label="Submission period">
  <af:convertDateTime pattern="yyyy-MM-dd"/>

  <!-- Supports ISO date format strings of the form "yyyy-MM-dd" -->
  <af:validateDateTimeRange
       minimum="2004-11-16"
       maximum="2004-12-16"
       messageDetailNotInRange="Date "{1}" does not fall within the range {2} : {3}"/>
</af:inputDate>

Attributes

Name Type Supports EL? Description
disabledbooleanYes Default Value: false

Whether the validator should be disabled, default to false.
hintMaximumStringYes

Hint message to be used, to give a hint about the allowed maximum.

Parameters:

  • {0} the maximum
hintMinimumStringYes

Hint message to be used, to give a hint about the allowed minimum.

Parameters:

  • {0} the minimum
hintNotInRangeStringYes

Hint message to be used, to give a hint about the allowed range.

Parameters:

  • {0} the minimum
  • {1} the maximum
maximumjava.util.DateYes the maximum java.util.Date. ISO 8601 date strings, of the form 'yyyy-MM-dd' (for example 2004-06-22) is also allowed - the created Date object will be in the application's timezone with the time components (hours, minutes, seconds, milliseconds) maximized. This will be parsed to date. When binding to Date objects, it is advised to create the Date object with maximum value for any date-time components that aren't displayed (usually hours, minutes, seconds, milliseconds) to allow the largest range of values to be accepted.
messageDetailMaximumStringYes

The detail error message to be used for constructing faces messages, when input value exceeds the maximum value set.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the maximum allowed date
Please note: Parameter {1} which specifies the value entered by the user, should never be used in the message if the value is secure, like when secret=true on inputText.
messageDetailMinimumStringYes

The detail error message to be used for constructing faces messages, when input value is less than the set minimum value.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the minimum allowed date
Please note: Parameter {1} which specifies the value entered by the user, should never be used in the message if the value is secure, like when secret=true on inputText.
messageDetailNotInRangeStringYes

The detail error message to be used for constructing faces messages, if input value is not with in the range, when minimum and maximum is set.

Parameters:

  • {0} the label that identifies the component
  • {1} value entered by the user
  • {2} the minimum allowed date
  • {3} the maximum allowed date
Please note: Parameter {1} which specifies the value entered by the user, should never be used in the message if the value is secure, like when secret=true on inputText.
minimumjava.util.DateYes The minimum java.util.Date. ISO 8601 date strings, of the form 'yyyy-MM-dd' (for example 2004-06-22) are also allowed - the created Date object will be in the application's timezone with the time components (hours, minutes, seconds, milliseconds) zeroed-out. This will be parsed to date. When binding to Date objects, it is advised to create the Date object with zeroed-out values for any date-time components that aren't displayed (usually hours, minutes, seconds, milliseconds) to allow the largest range of values to be accepted.