[ 
http://issues.apache.org/jira/browse/TAPESTRY-875?page=comments#action_12372111 
] 

Jesse Kuhnert commented on TAPESTRY-875:
----------------------------------------

Reverted patch. Will apply again if it is fixed, otherwise will probably close 
this issue as I plan on replacing it with a new datepicker.

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to