You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by אלחנן מעין <em...@msn.com> on 2007/04/23 17:42:55 UTC

DateTimePicker in time format not working with today

hi all..
i've finally started to learn struts2 and trying work a sample application 
of an hours reporting app.

i'm trying to use the DateTimePicker time format, however i have 2 issues 
with it:

trying to specify today in the value, does not display the current time (it 
doesn't even work in showcase app) it only displays 00:00.

also is there a way to convert the time from a string to date object ? i'm 
not sure it's possible, but maybe create a date object with the current date 
as default and the time specfied.

anoter issue in date enddate and startdate attributes, i know of only one 
function called today, but is there a way to limit and start date, and end 
date dynamically with something like today-1, that would allow dates to be 
entered up to 1 month back?

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: DateTimePicker in time format not working with today

Posted by אלחנן מעין <em...@msn.com>.
well thanks none the less, maybe somehow, somewhere, somebody will make use 
of it while searching the mail list (even though i have no idea ) how to 
search a mailling list.



>From: "Rod Bollinger" <te...@portablegenius.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: "'Struts Users Mailing List'" <us...@struts.apache.org>
>Subject: RE: DateTimePicker in time format not working with today
>Date: Mon, 23 Apr 2007 12:13:31 -0400
>
>Sorry about the last post, I guess I didn't read closely enough. The 
>solution provided, although it works very well, will most likely not 
>address your DateTimePicker issue. Again, my apologies for the list 
>clutter.
>
>-Rod
>
>-----Original Message-----
>From: ××œ×—× ×Ÿ מעין [mailto:emaayan@msn.com]
>Sent: Monday, April 23, 2007 11:43
>To: user@struts.apache.org
>Subject: DateTimePicker in time format not working with today
>
>hi all..
>i've finally started to learn struts2 and trying work a sample application
>of an hours reporting app.
>
>i'm trying to use the DateTimePicker time format, however i have 2 issues
>with it:
>
>trying to specify today in the value, does not display the current time (it
>doesn't even work in showcase app) it only displays 00:00.
>
>also is there a way to convert the time from a string to date object ? i'm
>not sure it's possible, but maybe create a date object with the current 
>date
>as default and the time specfied.
>
>anoter issue in date enddate and startdate attributes, i know of only one
>function called today, but is there a way to limit and start date, and end
>date dynamically with something like today-1, that would allow dates to be
>entered up to 1 month back?
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar - get it now!
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: DateTimePicker in time format not working with today

Posted by Rod Bollinger <te...@portablegenius.com>.
Sorry about the last post, I guess I didn't read closely enough. The solution provided, although it works very well, will most likely not address your DateTimePicker issue. Again, my apologies for the list clutter.

-Rod

-----Original Message-----
From: ××œ×—× ×Ÿ מעין [mailto:emaayan@msn.com] 
Sent: Monday, April 23, 2007 11:43
To: user@struts.apache.org
Subject: DateTimePicker in time format not working with today

hi all..
i've finally started to learn struts2 and trying work a sample application 
of an hours reporting app.

i'm trying to use the DateTimePicker time format, however i have 2 issues 
with it:

trying to specify today in the value, does not display the current time (it 
doesn't even work in showcase app) it only displays 00:00.

also is there a way to convert the time from a string to date object ? i'm 
not sure it's possible, but maybe create a date object with the current date 
as default and the time specfied.

anoter issue in date enddate and startdate attributes, i know of only one 
function called today, but is there a way to limit and start date, and end 
date dynamically with something like today-1, that would allow dates to be 
entered up to 1 month back?

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: DateTimePicker in time format not working with today

Posted by Rod Bollinger <te...@portablegenius.com>.
Hello,

A cool little trick on the "today" issue is to use a little known aspect of the <jsp:useBean> tag. The useBean exposes its creation datetime as a scoped variable!

Beacause of this you can do the following:

<jsp:useBean id="now" class="java.util.Date" />
<c:set var="today" value="${now}" />

Now you can use ${today} anywhere you like. Personally, I use the <fmt:formatDate> tag to format into whatever display format I need.

HTH,
-Rod

-----Original Message-----
From: ××œ×—× ×Ÿ מעין [mailto:emaayan@msn.com] 
Sent: Monday, April 23, 2007 11:43
To: user@struts.apache.org
Subject: DateTimePicker in time format not working with today

hi all..
i've finally started to learn struts2 and trying work a sample application 
of an hours reporting app.

i'm trying to use the DateTimePicker time format, however i have 2 issues 
with it:

trying to specify today in the value, does not display the current time (it 
doesn't even work in showcase app) it only displays 00:00.

also is there a way to convert the time from a string to date object ? i'm 
not sure it's possible, but maybe create a date object with the current date 
as default and the time specfied.

anoter issue in date enddate and startdate attributes, i know of only one 
function called today, but is there a way to limit and start date, and end 
date dynamically with something like today-1, that would allow dates to be 
entered up to 1 month back?

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: DateTimePicker in time format not working with today

Posted by אלחנן מעין <em...@msn.com>.
you say the dojo DateTimePicker, as if there was another DateTimePicker? is 
there? is there an eta on 2.1?
aside from that, is there another way to enter in dates and have them 
validated ? (aside from using text fields).

what about time fields?


>From: "Musachy Barroso" <mu...@gmail.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Subject: Re: DateTimePicker in time format not working with today
>Date: Mon, 23 Apr 2007 12:05:24 -0400
>
>I think this question was posted the other day. You can set
>startDate="dateInThePast" and have a getInThePast()  methodin your action
>(which needs to return an string, in 2.1 it will take a Date object also).
>
>As for the time picker, the dojo datepicker widget, in version 0.4.1 was so
>broken that it was barely functional, some workarounds were added to make 
>it
>work, but I'm sure it has plenty of bugs. It has been fixed on 2.1 (that
>won't help you, but it is good to know :) )
>
>regards
>musachy
>
>On 4/23/07, אלחנן מעין <em...@msn.com> wrote:
>>
>>hi all..
>>i've finally started to learn struts2 and trying work a sample application
>>of an hours reporting app.
>>
>>i'm trying to use the DateTimePicker time format, however i have 2 issues
>>with it:
>>
>>trying to specify today in the value, does not display the current time
>>(it
>>doesn't even work in showcase app) it only displays 00:00.
>>
>>also is there a way to convert the time from a string to date object ? i'm
>>not sure it's possible, but maybe create a date object with the current
>>date
>>as default and the time specfied.
>>
>>anoter issue in date enddate and startdate attributes, i know of only one
>>function called today, but is there a way to limit and start date, and end
>>date dynamically with something like today-1, that would allow dates to be
>>entered up to 1 month back?
>>
>>_________________________________________________________________
>>FREE pop-up blocking with the new MSN Toolbar - get it now!
>>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>--
>"Hey you! Would you help me to carry the stone?" Pink Floyd

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: DateTimePicker in time format not working with today

Posted by Musachy Barroso <mu...@gmail.com>.
I think this question was posted the other day. You can set
startDate="dateInThePast" and have a getInThePast()  methodin your action
(which needs to return an string, in 2.1 it will take a Date object also).

As for the time picker, the dojo datepicker widget, in version 0.4.1 was so
broken that it was barely functional, some workarounds were added to make it
work, but I'm sure it has plenty of bugs. It has been fixed on 2.1 (that
won't help you, but it is good to know :) )

regards
musachy

On 4/23/07, אלחנן מעין <em...@msn.com> wrote:
>
> hi all..
> i've finally started to learn struts2 and trying work a sample application
> of an hours reporting app.
>
> i'm trying to use the DateTimePicker time format, however i have 2 issues
> with it:
>
> trying to specify today in the value, does not display the current time
> (it
> doesn't even work in showcase app) it only displays 00:00.
>
> also is there a way to convert the time from a string to date object ? i'm
> not sure it's possible, but maybe create a date object with the current
> date
> as default and the time specfied.
>
> anoter issue in date enddate and startdate attributes, i know of only one
> function called today, but is there a way to limit and start date, and end
> date dynamically with something like today-1, that would allow dates to be
> entered up to 1 month back?
>
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar - get it now!
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd