[opencms-dev] Problem with Date Picker widget on OpenCms 8.5.1

Tobias Herrmann t.herrmann at alkacon.com
Mon Mar 4 15:18:57 CET 2013


Hi,

the new date picker that is used within the gallery search, the new availability dialogue and the new content editor is based on the standard GWT date picker. Configuration options of this widget are very limited. The first day of the week setting depends on the users workplace locale. For example, 
if you choose German as your workplace locale, it will use Monday as first day of the week. If you choose English it's Sunday. The date pattern used also depends on the workplace locale, it is set in the message bundle org/opencms/gwt/clientmessages.properties. The relevant message keys are

GUI_DATEBOX_TIME_PATTERN_0, GUI_DATEBOX_DATE_PATTERN_0, GUI_DATEBOX_DATETIME_PATTERN_0

Using the widget configuration in the XSD schema for the first day of the week, won't take any effect on the new widget.

Greetings, Tobias

--

Alkacon Software GmbH - The OpenCms Experts

http://www.alkacon.com
http://www.opencms.org

Am 04.03.2013 14:53, schrieb Paul-Inge Flakstad:
> Hi,
>
> I'm interested in this as well.
>
> The DateTimeWidget churns out a javascript calling Calendar.setup(...) with some configuration settings, but they seem to have no effect on the widget (mondayFirst is true, but calendar still shows Sunday as the first day of week).
>
>  From the looks of it, there are a number of options which would have been nice to control.
>
> Is there any way to control these options and have them take effect on the widget? (How?)
>
> Cheers,
> Paul
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Arturo Martín Lladó
> Sent: 4. mars 2013 13:52
> To: The OpenCms mailing list
> Subject: [opencms-dev] Problem with Date Picker widget on OpenCms 8.5.1
>
> Hi,
>
> I see that, by default, the date picker widget shows Sunday as the first day of the week. I tried to configure the widget via layout settings like this:
>
> [...]
>
> <xsd:element name="dateTimeField" type="OpenCmsDateTime" minOccurs="1"
> maxOccurs="1" />
>
> [...]
>
> <layout element="dateTimeField" widget="DateTimeWidget"
> configuration="mondayFirst=true"/>
>
> [...]
>
> but I see no change.
>
> I've downloaded the OpenCms 8.5.1 code and established a breakpoint over the CmsCalendarWidget's calendarInit() method, but the method it's never called when I'm editing the content (loading the element form or setting a new datetime value). Other methods are called, like getConfiguration(), isInternal(), newInstance(), etc.
>
> Am I doing something wrong? Am I missing something here?
>
> Funny thing: when I click on the "Preferences" button of the workplace popup, the method is called. The only datetime field that I see there is the Time Warp option, and the calendar shown there is correctly localized for my settings (langua/locale = es).
>
> Maybe is a bug, but I really need a little bit of feedback here.
>
> Regards,
> --
> Arturo Martín Lladó
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



More information about the opencms-dev mailing list