You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Paul Ferraro (JIRA)" <ta...@jakarta.apache.org> on 2006/03/24 20:30:37 UTC

[jira] Reopened: (TAPESTRY-875) DatePicker delimiter limitations

     [ http://issues.apache.org/jira/browse/TAPESTRY-875?page=all ]
     
Paul Ferraro reopened TAPESTRY-875:
-----------------------------------

     Assign To: Jesse Kuhnert

This fix breaks the default formatting of dates.
e.g.
After selecting March 24 2006, the date is formatted as "24 3ar 2006"

Since the patch breaks default behavior, I'm reopening the issue.

> DatePicker delimiter limitations
> --------------------------------
>
>          Key: TAPESTRY-875
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-875
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: unspecified
>     Reporter: Matthias Zitzmann
>     Assignee: Jesse Kuhnert
>      Fix For: 4.0.1
>  Attachments: DatePicker.diff
>
> Using the DatePicker for a date format containing no "word delimiter" doesn't work because of an inefficient limitational replacement-method in DatePicker.js. I added a patch for this, because I've to work with a date format of ddMMyy (without delimiter). With that patch it won't break any more neither for regular date formats nor for this delimiter-free format used in financial or touristics for example.
> --- DatePicker.js	Wed Mar 08 16:42:15 2006
> +++ DatePicker.orig.js	Wed Mar 08 16:45:35 2006
> @@ -807,10 +807,10 @@
>      var frm = new String(this._format);
>      // TAPESTRY-669: Have to be very explicit about keys, to keep functions added
>      // to Array (by the Prototype library, if its around) from getting mixed in.
> -    var keys = new Array('dddd','ddd','dd','d','MMMM','MMM','MM','M','yyyy','yy', 'ss', 's', 'mm',
> -        'm', 'HH', 'H');
> +    var keys = new Array('d','dd','ddd','dddd','M','MM','MMM','MMMM','yyyy','yy', 's', 'ss', 'm',
> +        'mm', 'H', 'HH');
>      for (var i = 0; i < keys.length; i++) {
> -       frm = eval("frm.replace(/" + keys[i] + "/,\"" + bits[keys[i]] + "\");");      
> +       frm = eval("frm.replace(/\\b" + keys[i] + "\\b/,\"" + bits[keys[i]] + "\");");      
>      }     
>  
>      return frm;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org