I have mutiple dates in my form, some of which have to be displayed with time
component and some with out it. I tried using the date time picker but it
only gives me the label! Following the recommendation on this forum I
reverted to jsCalendar
The jsp which was created contained following snippet for one of the dates(
all three js files for calendar ae included in jsp but not shown here): 
    <s:textfield key="carrier.createDate" required="false" cssClass="text"
size="15" title="date"/> 
     . 
     . 
   Form.focusFirstElement($("carrierForm")); 
    Calendar.setup({inputField: "carrierForm_carrier_createDate", ifFormat:
"%m/%d/%Y",       button: "carrier.createDateDatePicker"}); 
    . 
    . 

Now my problems are: 
1. I do not see any button after my create date field on the form to choose
a date. The calendar appears when I click in the field

2. If I try to edit the date in field manually by giving a wrong format it
comes back with an error: 
   Invalid field value for field "carrier.createDate", instead of the actual
value of the property('Create Date' in this case) in the error message, as
in case of other   fields. 

3. The default behavior for the date fields is:
When values are populated from entity the time component is displayed, when
I save it the time component goes away and only date is dispalyed (though it
is saved in the db correctly). But if I go back to the list and come to the
form again time for all fields is present. 
How can I specify that only certain fields should show time and others
should not in all the circumstances?
Thanks a lot,
Arvinder

-- 
View this message in context: 
http://www.nabble.com/Problems-with-date-format-in-basic-struts2M5-tf4009639s2369.html#a11387030
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to