You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Wichmann <di...@team-wichmann.de> on 2014/04/17 15:48:13 UTC
jquery ui DatePicker
Hi,
is's quite frustrating, I use the jquery ui DatePicker for a valid to
filed on a user form.
Everything seems to be ok, but....
I want to display that a user don't expire and so I save 31.12.9999
(german date format dd.MM.yyyy) in database.
Now I try to edit a user and the init of the form is OK, but the
datepicker input field shows always 31.12.99 (two digits in year)
normally no problem
If I try to save the data I get a validation error, because the internal
representation of the date is 31.12.1999.
After asking google I found a view tips but nothing works for me??
Any help or idea ??
Thanks in advance
Cheers
Dirk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jquery ui DatePicker
Posted by Patrick Davids <pa...@nubologic.com>.
Hi Dirk,
have a look at http://jqueryui.com/datepicker/#date-formats
and
http://api.jqueryui.com/datepicker/#option-dateFormat
to change the javascript-side jquery date formatting pattern to
4-letter-year.
(Pay attention, it is a bit different to java date patterns.)
To do so, you have to apply the jquery date pattern as an Option to your
DatePicker instance on java-side.
Something like this:
new Options("dateFormat", Options.asString("dd.mm.yyyy")
kind regards
Patrick
Am 17.04.2014 15:48, schrieb Dirk Wichmann:
> Hi,
>
> is's quite frustrating, I use the jquery ui DatePicker for a valid to
> filed on a user form.
> Everything seems to be ok, but....
> I want to display that a user don't expire and so I save 31.12.9999
> (german date format dd.MM.yyyy) in database.
> Now I try to edit a user and the init of the form is OK, but the
> datepicker input field shows always 31.12.99 (two digits in year)
> normally no problem
> If I try to save the data I get a validation error, because the internal
> representation of the date is 31.12.1999.
> After asking google I found a view tips but nothing works for me??
>
> Any help or idea ??
>
> Thanks in advance
> Cheers
> Dirk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jquery ui DatePicker
Posted by Dirk Wichmann <di...@team-wichmann.de>.
Hi,
that's it, thanks a lot, sometimes the solution is so near.....
Cheers
Dirk
Am 17.04.2014 16:04, schrieb Sebastien:
> new DatePicker("mydate", model, "dd.MM.yyyy", new
> Options("dateFormat", Options.asString("dd.mm.yy")));
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jquery ui DatePicker
Posted by Sebastien <se...@gmail.com>.
Hi Dirk,
If you are referring to wicket-jquery-ui datepicker: the jquery date format
option should match the java date format, ie:
new DatePicker("mydate", model, "dd.MM.yyyy", new
Options("dateFormat", Options.asString("dd.mm.yy")));
Hope this helps,
Sebastien.
On Thu, Apr 17, 2014 at 3:48 PM, Dirk Wichmann <di...@team-wichmann.de>wrote:
> Hi,
>
> is's quite frustrating, I use the jquery ui DatePicker for a valid to
> filed on a user form.
> Everything seems to be ok, but....
> I want to display that a user don't expire and so I save 31.12.9999
> (german date format dd.MM.yyyy) in database.
> Now I try to edit a user and the init of the form is OK, but the
> datepicker input field shows always 31.12.99 (two digits in year)
> normally no problem
> If I try to save the data I get a validation error, because the internal
> representation of the date is 31.12.1999.
> After asking google I found a view tips but nothing works for me??
>
> Any help or idea ??
>
> Thanks in advance
> Cheers
> Dirk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>