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

                 Key: WICKET-2773
                 URL: https://issues.apache.org/jira/browse/WICKET-2773
             Project: Wicket
          Issue Type: Bug
          Components: wicket-extensions
    Affects Versions: 1.4.7
            Reporter: János Cserép


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); 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to