You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Karen Schaper <Ka...@frontiernet.net> on 2007/12/16 22:55:47 UTC

DatePickerSettings and Time?

Hello,

I am looking for a component that I can use that will allow users to enter a
date and a time.

I was hoping to use the following 2 classes to accomplish this.

	wicket.extensions.markup.html.datepicker.DatePickerSettings	;
	wicket.extensions.markup.html.datepicker.PopupDatePicker;

I don't see a way to change the format to also allow for a time to be
entered.

Is there another package that has components that allow for a time picker?

Also I ran into a problem with using the date picker in a modal window.  It
didn't work.  Any workarounds for that?

Thanks for any help.

Karen


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


Re: Format date column in DefaultDataTable

Posted by Jason Anderson <jl...@gmail.com>.
Likewise, I'm not sure if its the "best" way but i generally create a
quick FormattedPropertyColumn class that extends PropertyColumn and
creates the formatted label model with java.text.MessageFormat for
number/currency/date formatting purposes

Cheers,
Jason

On Dec 17, 2007 11:03 PM, Stefan Lindner <li...@visionet.de> wrote:
> I use two solutions for this (depends on the situatioin)
> 1. Define your own Date class (e.g. class MyDate extends Date), write a Converter for MyDate, add a method getMyDate to your data class and write
>      columns.add( new PropertyColumn( new Model( "Call Received" ),
>      "callReceived",      "getMyDate" ) );
> 2. Override the populateItem method of the PropertyColumn class e.g. place a simple Label with the String representatin of your Date into the table cell
>
> Maybe there is a better way to do this and I can learn from the communito too.
>
> Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: Karen Schaper [mailto:Karen.Schaper@frontiernet.net]
> Gesendet: Dienstag, 18. Dezember 2007 00:40
> An: users@wicket.apache.org
> Betreff: Format date column in DefaultDataTable
>
>
> Hi,
>
> Another newbie question from me.
>
> I have a table that has a date column in it and I am trying to format the date to also display the time.  It seems to just default to showing ie.
> 11/14/07.
>
> I can't see how to add any of the date converter or formatting of dates to the table I am using below.  The callReceived is a date object.
>
>
> List columns = new ArrayList();
>
> columns.add( new PropertyColumn( new Model( "Call Received" ),
> "callReceived",      "callReceived" ) );
> .
> .
> .
> add( new DefaultDataTable( "troubleCallTable", columns, _dataProvider,
> 25 ) );
>
> Thanks for all your previous replies as well.. they have been very helpful.
>
> Karen.
>
>
> ---------------------------------------------------------------------
> 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
>
>

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


RE: Format date column in DefaultDataTable

Posted by Stefan Lindner <li...@visionet.de>.
I use two solutions for this (depends on the situatioin)
1. Define your own Date class (e.g. class MyDate extends Date), write a Converter for MyDate, add a method getMyDate to your data class and write
     columns.add( new PropertyColumn( new Model( "Call Received" ),
     "callReceived",      "getMyDate" ) );
2. Override the populateItem method of the PropertyColumn class e.g. place a simple Label with the String representatin of your Date into the table cell

Maybe there is a better way to do this and I can learn from the communito too.

Stefan

-----Ursprüngliche Nachricht-----
Von: Karen Schaper [mailto:Karen.Schaper@frontiernet.net] 
Gesendet: Dienstag, 18. Dezember 2007 00:40
An: users@wicket.apache.org
Betreff: Format date column in DefaultDataTable

Hi,

Another newbie question from me.

I have a table that has a date column in it and I am trying to format the date to also display the time.  It seems to just default to showing ie.
11/14/07.

I can't see how to add any of the date converter or formatting of dates to the table I am using below.  The callReceived is a date object.


List columns = new ArrayList();

columns.add( new PropertyColumn( new Model( "Call Received" ),
"callReceived",      "callReceived" ) );
.
.
.
add( new DefaultDataTable( "troubleCallTable", columns, _dataProvider,
25 ) );

Thanks for all your previous replies as well.. they have been very helpful.

Karen.


---------------------------------------------------------------------
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


Format date column in DefaultDataTable

Posted by Karen Schaper <Ka...@frontiernet.net>.
Hi,

Another newbie question from me.

I have a table that has a date column in it and I am trying to format the
date to also display the time.  It seems to just default to showing ie.
11/14/07.

I can't see how to add any of the date converter or formatting of dates to
the table I am using below.  The callReceived is a date object.


List columns = new ArrayList();

columns.add( new PropertyColumn( new Model( "Call Received" ),
"callReceived",      "callReceived" ) );
.
.
.
add( new DefaultDataTable( "troubleCallTable", columns, _dataProvider,
25 ) );

Thanks for all your previous replies as well.. they have been very helpful.

Karen.


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


Re: DatePickerSettings and Time?

Posted by Eelco Hillenius <ee...@gmail.com>.
On Dec 16, 2007 1:55 PM, Karen Schaper <Ka...@frontiernet.net> wrote:
> Hello,
>
> I am looking for a component that I can use that will allow users to enter a
> date and a time.
>
> I was hoping to use the following 2 classes to accomplish this.
>
>         wicket.extensions.markup.html.datepicker.DatePickerSettings     ;
>         wicket.extensions.markup.html.datepicker.PopupDatePicker;
>
> I don't see a way to change the format to also allow for a time to be
> entered.
>
> Is there another package that has components that allow for a time picker?

Please take a look at the wicket-datetime project.

Eelco

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