[OpenAjaxIDE] date formatting

Adam Peller apeller at us.ibm.com
Thu Aug 20 07:06:41 PDT 2009

Jon Ferraiolo wrote on 08/20/2009 12:55:11 AM:
> (1) So far, I haven't seen any JavaScript-free OAM files for OAM
> files that wrap widgets from Ajax toolkits. If OAM authors need to
> resort to JavaScript anyway, then for the YUI calendar widget (and
> similar calendar widgets), the widget developer working on the
> calendar widget can figure out how to format the date values
> (perhaps by including Steve's 40 lines of JavaScript within that
> particular widget)

Actually, it wouldn't be anywhere near that much.  You don't need
generic date formatting code at that point.  It's a one-liner
to build MM/dd/yyyy out of a Date object, just a bit more to go from
an ISO string, but it's certainly a snippet we can provide.

> (2) I'm not sure that it is compelling easier for a widget developer
> to discover and learn how to use the 'formatString' attribute versus
> writing a little JavaScript to create the appropriate string before
> calling the constructor.
> But nevertheless, if the majority want this feature, I'm OK with
> adding it as Scott proposes below.

Yeah, I realize I'm losing this argument, but I think Jon makes
a good point in #2.  Case in point, Scott's OAM snippet already has
a Javascript tag with at least one line of Javascript.  It would be
interesting to see what it would look like if the transformation
happened there.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20090820/6e36800a/attachment-0001.html 

More information about the IDE mailing list