Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2877

alloy:inputDate minDate/maxDate throws SyntaxError: "09 is not a legal ECMA-262 octal constant" in Firefox when month or day is 08 or 09

    Details

      Description

      {markdown}
      Steps to reproduce:

      1. Add the following markup to a webapp:

      <alloy:inputDate minDate="08/09/2015" pattern="MM/dd/yyyy" />

      2. Deploy and navigate to the webapp in Firefox.

      If the bug still exists, the following errors will appear in the logs:

      > SyntaxError: 08 is not a legal ECMA-262 octal constant
      >
      > SyntaxError: 09 is not a legal ECMA-262 octal constant
      >
      > SyntaxError: 08 is not a legal ECMA-262 octal constant
      >
      > SyntaxError: 09 is not a legal ECMA-262 octal constant

      If the bug is fixed, no errors will appear in the logs.

      This bug is due to fact that [JavaScript interprets numbers starting with 0 as octal, and 08 and 09 are not valid octal values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Bad_octal).

      For unknown reasons, this error also causes [body scripts](https://github.com/liferay/liferay-faces-bridge-ext/blob/c795c5b0e0e617e175e1828111b5f89954ae8660/src/main/java/com/liferay/faces/bridge/ext/renderkit/html_basic/internal/ScriptsEncoderLiferayImpl.java#L42) not to be rendered in Liferay 7.{markdown}

        Attachments

          Activity

            People

            Assignee:
            kyle.stiemann Kyle Stiemann (Inactive)
            Reporter:
            kyle.stiemann Kyle Stiemann (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                alloy-2.0.0
                alloy-3.0.0