You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alex Colic <al...@pop-ware.com> on 2001/11/19 15:58:48 UTC
Help, can I do this..two fields one property.
Help,
I have a page that is dynamically created. One of the fields is a date
field. I have a javascript calendar that allows the user to input the date
into that field. Now I have been told that they also need to select the
time. I need to create a select box with values of (12am-11pm) and have the
select value appended to the end of the date input box on submit.
Any ideas on how to get around this predicament.
Thanks for any info.
Alex
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Help, can I do this..two fields one property.
Posted by Sean Owen <sr...@yahoo.com>.
And the server-side option, how about:
public class MyActionForm extends ActionForm {
private Calendar theDateAndTime;
...
public void reset(...) {
...
theDateAndTime = new GregorianCalendar(0,0,0,0,0,0);
}
...
public void setDate(String date) {
// parse date and set year/month/day of Calendar object
}
public void setTime(String time) {
// parse time and set hour/minute/sec of Calendar object
}
...
// and then to get the time...
public Date getDateAndTime() {
return theDateAndTime.getTime();
}
...
}
Sean
----- Original Message -----
From: "Alex Colic" <al...@pop-ware.com>
To: "Struts" <st...@jakarta.apache.org>
Sent: Monday, November 19, 2001 2:58 PM
Subject: Help, can I do this..two fields one property.
> Help,
>
> I have a page that is dynamically created. One of the fields is a date
> field. I have a javascript calendar that allows the user to input the date
> into that field. Now I have been told that they also need to select the
> time. I need to create a select box with values of (12am-11pm) and have
the
> select value appended to the end of the date input box on submit.
>
> Any ideas on how to get around this predicament.
>
> Thanks for any info.
>
> Alex
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Help, can I do this..two fields one property.
Posted by Scott Atwell <sc...@rcms.com>.
Just use some javascript...
hava a hidden field that will be used to concat the two fields (date and
time) and on the onClick (or whatever!) of the fields run the javascript.
----- Original Message -----
From: "Alex Colic" <al...@pop-ware.com>
To: "Struts" <st...@jakarta.apache.org>
Sent: Monday, November 19, 2001 2:58 PM
Subject: Help, can I do this..two fields one property.
> Help,
>
> I have a page that is dynamically created. One of the fields is a date
> field. I have a javascript calendar that allows the user to input the date
> into that field. Now I have been told that they also need to select the
> time. I need to create a select box with values of (12am-11pm) and have
the
> select value appended to the end of the date input box on submit.
>
> Any ideas on how to get around this predicament.
>
> Thanks for any info.
>
> Alex
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>