1 Reply Latest reply on Jul 27, 2007 11:51 PM by pmohanan

    <f:converdatetime pattern not working for MM/dd/YY

    pmohanan

      Hi...All,

      The tomahawk calendar code below fails when the user enters 07/07/07 & it converts into 07/07/0007 . We want to enforce the rule that the user has to enter 4 YYYY before even the component converts it or atleast it should be automatically get converted to 2007.

      How do we do that?

      Here is the code:

      t:inputCalendar validator="#{utility.validateDate}" id="startdate" size="11" maxlength="10" renderAsPopup="true" popupButtonStyle="height:17px;vertical-align:middle" popupButtonImageUrl="../../images/calendar1.gif" renderPopupButtonAsImage="true"

      value="#{hrDataViewBean.effectiveFromDate}"

      styleClass="FrmNormalType">

      <f:convertDateTime type="date"

      pattern="MM/dd/YYYY" timeZone="America/Los_Angeles" />

      </t:inputCalendar>

        • 1. Re: <f:converdatetime pattern not working for MM/dd/YY
          pmohanan

          Sorry we added the validator later :

          The actual code should look like this:

          <t:inputCalendar id="startdate" size="11" maxlength="10" renderAsPopup="true" popupButtonStyle="height:17px;vertical-align:middle" popupButtonImageUrl="../../images/calendar1.gif" renderPopupButtonAsImage="true"

          value="#{hrDataViewBean.effectiveFromDate}"

          styleClass="FrmNormalType">

          <f:convertDateTime type="date"

          pattern="MM/dd/YYYY" timeZone="America/Los_Angeles" />

          </t:inputCalendar>