struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fireapple <taizhang1...@gmail.com>
Subject Re: how to eliminate time in <s:textfield>
Date Fri, 19 Feb 2010 14:58:11 GMT

Does that mean I have to create something like:

public String getStartDateStr()
{
...........
}

to do this?

I don't want to use this because if I use this getter, I have to create a
setter for this since user can edit the date.

Any other options? Thanks



Brian Thompson-5 wrote:
> 
> Just add a getter to your "train" object that translates the startDate
> into
> the format you'd like.  Use a DateFormat object.
> 
> -Brian
> 
> 
> 
> On Thu, Feb 18, 2010 at 5:07 PM, fireapple <taizhang1981@gmail.com> wrote:
> 
>>
>> Dear all, I'm using
>> <s:textfield name="train.startDate" cssClass="datepicker">
>>
>> where startDate is a java.util.Date field of an object train.
>>
>> The output is something like this:
>>
>> http://old.nabble.com/file/p27647328/date.png
>>
>> How can I eliminate the 12:00:00 in the textfield? Thanks!
>> --
>> View this message in context:
>> http://old.nabble.com/how-to-eliminate-time-in-%3Cs%3Atextfield%3E-tp27647328p27647328.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/how-to-eliminate-time-in-%3Cs%3Atextfield%3E-tp27647328p27653078.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message