struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <jeromy.ev...@blueskyminds.com.au>
Subject Re: [S2.0.8] datetimepicker.... is it a train wreck?
Date Thu, 14 Jun 2007 10:59:28 GMT

> My question is if the datetimepicker is only going to be ready in 2.1 then
> how should I implement this in my application? 
>   
As mentioned previously in this thread, a work-around for the current 
datetimepicker issues is to convert the date value to and from an 
RFC3339 string within your action.  The conversion is a simple 
DateFormat operation.  This is the JSP that works:

<s:datetimepicker name="answerString" displayFormat="d MMMM yyyy"
                      type="date"
                      value="%{defaultAnswerDate}"
                      startDate="%{todayAsRFC3339}"
                      required="true"/>

where answerString, defaultAnswerDate and todayAsRFC3339 are all string 
properties and all values are in RFC3339 format (not Date!)

That will give you a popup calendar that works in at least in IE6 and 
Firefox.  I burnt about 10 hours trying to get that stupid thing to work.

The timepicker mode (type="time") is simply terrible and I can't 
recommend it whatsoever.  It works, but it's awful to use.  I've already 
removed it from all my projects and replaced it with some selects and 
basic javascript.  In fact, my client also hates the datetimepicker 
calendar implementation (type="date") - sure it looks nice, but for 
reasons I don't understand the popup's design seems to confuse 
non-technical people.  I'll be replacing that with the one Torsten 
emailed about earlier at the first opportunity I get:

http://www.mattkruse.com/javascript/calendarpopup/

- Jeromy Evans


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


Mime
View raw message