Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1979

Issue with client side DateRestrictionValidator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1
    • None
    • None
    • environment independent

    Description

      Client side date restriction validator (TrDateRestrictionValidator) has an issue getting the hint. The hint is produced by function TrDateRestrictionValidator.prototype.getHints(), which
      (1) remove the disabled weekday values from the full weekday list
      (2) remove the disabled month values from the full month list
      (3) generate the final hint message

      (1) and (2) is achieved by calling TrCollections.removeValuesFromArray(Object, Object), but TrCollections.removeValuesFromArray(Object, Object) assumes that both arguments are of type Array, while the disabled weekday values and disabled month values are maps, so (1) and (2) are not performed correctly, thus the final hint message is wrong.

      We need to add a method in TrCollections to remove values in a map from the array and calls that method in TrDateRestrictionValidator.prototype.getHints().

      Attachments

        1. hint.patch
          3 kB
          Jing Wu
        2. datehint.patch
          3 kB
          Jing Wu

        Activity

          People

            Unassigned Unassigned
            jingwu Jing Wu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: