Hi,
In 1.4 trunk, there is a Dojo date widget currently hooked up to
the Journal Entry screen. I've been planning to move this into
UI/lib/elements.html, basically create a "date" element that can
then be more easily hooked up, and then there's a single place
where the date format preferences can be handled for everywhere in
the application... and a nifty drop-down date widget included.
What I haven't yet figured out is how to get the user's date
format and locale preference injected into the template system. If
somebody can more easily inject that into the environment so it
can be accessed by a variable, this will be a very easy thing to
solve.
The next question then becomes, do we localize in the JS only, or
also on the server?
Here are some examples for how you can set date formats in the
date widget:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_DateTextBox.html
, and then Dojo could automatically convert those to a single
format that is actually submitted on the form -- this to me seems
like the easier approach. Then the form post handler can expect a
consistent format from anywhere.
There are more date parsing formats available, we could even
support custom formats as described here:
http://dojotoolkit.org/reference-guide/1.9/dojo/date/locale/parse.html#dojo-date-locale-parse
Cheers,
John Locke
http://www.freelock.com
On 08/09/2013 05:36 AM, Erik Huelsmann wrote:
>>
>> > Much of the new code has date fields being of
class "date" which is there in part to allow _javascript_ handles
to be added programmatically in a central manner.
>>
>> >My larger question is this: what is the best way
to allow for customized handles like this?
>
> Hmmm, I have no idea.
>
> If you mentioned, it is possible to hook custom _javascript_s
for each class of input fields, probably a dedicated
subdirectory could contain custom scripts. I guess it needs to
develop a general framework.
>
> I guess you know more about the code and possibilities. :)
In my opinion, it'd be very good to include this in
the discussion on UI improvements John, Brian, Mikkel and others
are (going to be) having.
Possibly, this is just a matter of flipping a bit
there (i hope :-)
Bye,
Erik.
!DSPAM:5204e505296858941011170!
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
!DSPAM:5204e505296858941011170!
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
!DSPAM:5204e505296858941011170!