Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2773

yui DatePicker based wicket component truncates years to the 0-99 interval even if 'yyyy' is set as year pattern

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.4.7
    • None
    • wicket-extensions
    • None

    Description

      See last comment at http://issues.apache.org/jira/browse/WICKET-2648 - I open this new ticked because that one is closed.

      Bug is still in the "wicket-date.js", line 137.

      The wrong code is:

      if(datePattern.match(/yy+/)) year = Wicket.DateTime.padDateFragment(year % 100);

      This line also makes the module 100 on the year, when the year pattern is "yyyy".

      The fixed code is:

      if(datePattern.match(/yyyy+/))

      { year = year; }

      else if(datePattern.match(/yy+/)) year = Wicket.DateTime.padDateFragment(year % 100);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cserepj János Cserép
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: