You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Paul T <pt...@ifdsgroup.co.uk> on 2008/02/07 12:50:03 UTC

DatePicker

I have a problemette with the DatePicker (I'm using 1.3.1 by the way). This
is the code I have:

DateTextField dateTextField = new DateTextField( "dateTextField", new
PropertyModel( this, "date" ), new StyleDateConverter( "M-", true ) );
add( dateTextField );
dateTextField.add( new DatePicker() );

 - taken from the wicket examples.
When the dateStyle in the StyleDateConverter is set to "S-", everything
looks fine: the date shows correctly in the input field, and after changing
it using the widget it still looks right. However if I change the dateStyle
to "M-" or "L-" or "F-", the date initially is correct but after changing it
in the widget it has the wrong format e.g. selecting 14th Feb 2008 displays
14-2-2008.

Any advice will be gratefully received

Thanks,

Paul
-- 
View this message in context: http://www.nabble.com/DatePicker-tp15332237p15332237.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DatePicker

Posted by glooorrryyy <gl...@yahoo.com>.
In my opinion, we couldn't get the formatted date string according to the
locale.
Or could we do it?


igor.vaynberg wrote:
> 
> it may be that the js widget does not understand those styles, try
> using a style that explicitly defines the fields, eg MM/dd/yyyy
> 
> -igor
> 
> On Sun, Jun 28, 2009 at 8:23 PM, glooorrryyy<gl...@yahoo.com> wrote:
>>
>> Well, I've the same problem with Paul.
>>
>> Could anyone help us?
>>
>>
>> I created the textfield with this code:
>>
>> DateTextField.forDateStyle("dateEnd", "M-").add(new DatePicker());
>>
>>
>> Thanks!
>>
>>
>> Paul T wrote:
>>>
>>> I have a problemette with the DatePicker (I'm using 1.3.1 by the way).
>>> This is the code I have:
>>>
>>> DateTextField dateTextField = new DateTextField( "dateTextField", new
>>> PropertyModel( this, "date" ), new StyleDateConverter( "M-", true ) );
>>> add( dateTextField );
>>> dateTextField.add( new DatePicker() );
>>>
>>>  - taken from the wicket examples.
>>> When the dateStyle in the StyleDateConverter is set to "S-", everything
>>> looks fine: the date shows correctly in the input field, and after
>>> changing it using the widget it still looks right. However if I change
>>> the
>>> dateStyle to "M-" or "L-" or "F-", the date initially is correct but
>>> after
>>> changing it in the widget it has the wrong format e.g. selecting 14th
>>> Feb
>>> 2008 displays 14-2-2008.
>>>
>>> Any advice will be gratefully received
>>>
>>> Thanks,
>>>
>>> Paul
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DatePicker-tp15332237p24247901.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/DatePicker-tp15332237p24248714.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DatePicker

Posted by Igor Vaynberg <ig...@gmail.com>.
it may be that the js widget does not understand those styles, try
using a style that explicitly defines the fields, eg MM/dd/yyyy

-igor

On Sun, Jun 28, 2009 at 8:23 PM, glooorrryyy<gl...@yahoo.com> wrote:
>
> Well, I've the same problem with Paul.
>
> Could anyone help us?
>
>
> I created the textfield with this code:
>
> DateTextField.forDateStyle("dateEnd", "M-").add(new DatePicker());
>
>
> Thanks!
>
>
> Paul T wrote:
>>
>> I have a problemette with the DatePicker (I'm using 1.3.1 by the way).
>> This is the code I have:
>>
>> DateTextField dateTextField = new DateTextField( "dateTextField", new
>> PropertyModel( this, "date" ), new StyleDateConverter( "M-", true ) );
>> add( dateTextField );
>> dateTextField.add( new DatePicker() );
>>
>>  - taken from the wicket examples.
>> When the dateStyle in the StyleDateConverter is set to "S-", everything
>> looks fine: the date shows correctly in the input field, and after
>> changing it using the widget it still looks right. However if I change the
>> dateStyle to "M-" or "L-" or "F-", the date initially is correct but after
>> changing it in the widget it has the wrong format e.g. selecting 14th Feb
>> 2008 displays 14-2-2008.
>>
>> Any advice will be gratefully received
>>
>> Thanks,
>>
>> Paul
>>
>
> --
> View this message in context: http://www.nabble.com/DatePicker-tp15332237p24247901.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DatePicker

Posted by glooorrryyy <gl...@yahoo.com>.
Well, I've the same problem with Paul.

Could anyone help us?


I created the textfield with this code:

DateTextField.forDateStyle("dateEnd", "M-").add(new DatePicker());


Thanks!


Paul T wrote:
> 
> I have a problemette with the DatePicker (I'm using 1.3.1 by the way).
> This is the code I have:
> 
> DateTextField dateTextField = new DateTextField( "dateTextField", new
> PropertyModel( this, "date" ), new StyleDateConverter( "M-", true ) );
> add( dateTextField );
> dateTextField.add( new DatePicker() );
> 
>  - taken from the wicket examples.
> When the dateStyle in the StyleDateConverter is set to "S-", everything
> looks fine: the date shows correctly in the input field, and after
> changing it using the widget it still looks right. However if I change the
> dateStyle to "M-" or "L-" or "F-", the date initially is correct but after
> changing it in the widget it has the wrong format e.g. selecting 14th Feb
> 2008 displays 14-2-2008.
> 
> Any advice will be gratefully received
> 
> Thanks,
> 
> Paul
> 

-- 
View this message in context: http://www.nabble.com/DatePicker-tp15332237p24247901.html
Sent from the Wicket - User mailing list archive at Nabble.com.