Adrian,

ofbiz dojo is outdated (and AFAIK not used at all...) I have been
testing with the beta version of the new 0.9 dojo release (I just did
not like 0.4 version). Calendar in dojo 0.9 is fully localized based on
data from the CLDR and is also stylable through css. Anyway, being a
beta and the differences in locales between dojo and ofbiz I think your
solution is the best way to go right now. This solution will not be
faster as Jacques wanted, though ...

I will post when I create the issue.

Thanks,
--
Daniel

Adrian Crum escribió:
> I've been thinking about this some more...
>
> Maybe JavaScript isn't the way to go. JavaScript doesn't have a
> Calendar class, so creating a calendar in JS is a nightmare.
>
> I looked through the dojo source that is included with OFBiz and there
> is a lot of data to maintain. Even in the dozens of dojo calendar/date
> related files there are problems - just look at all of the FIXME
> comments.
>
> I considered passing localized data to JS functions, but that has
> problems too. For example, what do you do if there are quote
> characters in translated text? Those could be escaped I guess, but
> then the code starts becoming complicated.
>
> Maybe it would be better to have a regular HTML Calendar that pops up
> in its own window. That would require server requests, but the upside
> is we can use bsh, ftl, java.util.Calendar, and our own style sheet to
> style it. The name of the HTML element that receives the date could be
> passed as a parameter so that the selected date could be fed back to
> the parent window via the JS window.opener property.
>
> What do you think?
>
> -Adrian
>
>
> Adrian Crum wrote:
>
>> On second thought, since this is running in JavaScript, we can assume
>> the browser will default to the user's locale. The trick will be to
>> figure out how to render the calendar correctly in the user's locale.
>> Some locales have their week start on Monday, some locales have 13
>> months in a year, etc.
>>
>>
>> Adrian Crum wrote:
>>
>>> There are more locale issues than just the date format string.
>>> Different locales use different calendars. It would be best to find
>>> a way to pass a properly constructed Calendar object.
>>>
>>> -Adrian
>>>
>>> Daniel Martínez wrote:
>>>
>>>> Hi,
>>>>
>>>> As a pre for correct implementation of locale date formats I am
>>>> looking
>>>> forward to make a new javascript calendar. I have been testing dojo
>>>> 0.9
>>>> and it has a nice widget (DateTextbox) for selecting dates, It is nice
>>>> and fast ;) and it supports different locale formats. It should be
>>>> extended however to:
>>>>
>>>> - Accept time input.
>>>> - "Forget" about dojo locales (based upon CLDR, which I like but
>>>> that's
>>>> another story) and allow a date format string as parameter.
>>>>
>>>> These requirement should not be very difficult (I believe as I am a
>>>> newbie to dojo and javascript in general). However, being the calendar
>>>> one of the most visual parts of ofbiz I would like to see comments
>>>> about
>>>> this approach.
>>>>
>>>> Thanks,
>>>> -- 
>>>> Daniel Martínez
>>>> http://www.paradisosistemas.es
>>>>
>>>
>>

-- 
------------------------------------------------------------------------
Soluciones de Gestión para su empresa
eBusiness, ERP, CRM
------------------------------------------------------------------------
*Daniel Martínez Martínez*
* *
Gerente
C/ Julia García Boután, 29  D 3ºB
28022 Madrid
España  * *
        E-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
Web: *www.paradisosistemas.es <http://www.paradisosistemas.es>
*Comercial: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tel: 678416758


Reply via email to