On Mon, Feb 13, 2012 at 8:57 AM, cosmindumy <[email protected]> wrote:

> Hello again,
> I have the following problem. I have a customized DateTimePanel component,
> wich has a DateTextFiled. The problem is that when I change the locale and
> pressing submit the date is not valid anymore due to date format.
> For example I have set the locale de-DE, date looks 02.02.2012 I press
> submit, lets say the validation fails for other reason, when I change the
> locale to en-GB the date is still the german format. I have to choose again
> the date, and now it has the right format. If I don't press submit, when
> changing back to de-DE the date has the german format(even if before was
> english format). If I press the submit when locale is en-GB and the I
> change
> to de-DE the date has english format.
> I hope it is clear the situation, and maybe you have an answer for this.
> Thanks.
>

Please provide code so we can see your custom component and offer
assistance.  It seems like your component should pull the locale from the
session - perhaps in onBeforeRender - rather than requiring that it be set
on the component at construction.


-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to