You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alan Nisbet <al...@ecebs.com> on 2008/04/28 10:53:47 UTC
datetimepickers
Hi,
I'm trying to capture date and time from a datetimepicker, so I want the
date object to contain both date and time. Has anyone come up with a
decent solution on how to do this?
I would have thought it was a relatively common thing to try and do!
Best Regards,
Alan.
--
------------------------------------------------------------------
Alan Nisbet Phone: +44(0)1355 272911
Software Engineer Fax: +44(0)1355 272993
Ecebs Limited
The Toros Building,
Rankin Avenue
Scottish Enterprise Technology Park,
East Kilbride
G75 0QF Email: alan.nibset@ecebs.com
United Kingdom Internet: http://www.Ecebs.com
This email is only for the use of the addressee. It may contain
information which is legally privileged, confidential and exempt
from disclosure. If you are not the intended recipient you are
hereby notified that any dissemination, distribution, or copying
of this communication and its attachments is strictly prohibited.
------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: datetimepickers
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Alan Nisbet wrote:
> Hi,
>
> I'm trying to capture date and time from a datetimepicker, so I want
> the date object to contain both date and time. Has anyone come up with
> a decent solution on how to do this?
>
> I would have thought it was a relatively common thing to try and do!
>
> Best Regards,
>
> Alan.
>
It's a matter of ensuring the param you post to your action is in the
appropriate datetime format supported by the date converter (eg. RFC3339).
You can assemble the param from multiple inputs/widgets on the client
side using javascript prior to posting a form (and after loading a page
for the reverse)
The datetimepicker widget itself does not support selection of both date
and time. You need multiple widgets and you'll need to format/parse the
param in javascript yourself.
You may be less effort to use a date and time picker from a javascript
library that supports this already.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org