Hi,
I'm using com.smartgwt.client.widgets.form.fields.DateItem widget.
I'm adding this date on a DynamicForm:
and this form on a VLayout object:
The problem is reproducing in browsers like Firefox & Chrome when:
1. I'm selecting first the date from calendar - say I'm selecting 2011/02/11
2. I'm changing the day in 2011/02/12 manually - and I'm not changing the focus from this date field
3. I'm p the 'Save' button.
After these steps the date is 2011/02/11 and not 2011/02/12 how it should be.
In Internet Explorer browser did not happen - the date after the steps above is 2011/02/12!
I'm using smartgwt 2.4.
Thank you.
-----------------------------
Later edit:
I'm using a DataSource for updating the data.
I'm having a UserObject and in the userUpdate method I'm creating this user object first with values from fields (which are on the DynamicForm) - by calling the generateUserObjectFromForm() method
Here, in this method I'm doing something like: user.setAddedDate(date.getValueAsDate()), but here the date.getValueAsDate() value is the one selected from calendar, not the one modified manually.
I'm using an request object (UserUpdateRequest) for updating the user.
UserUpdateRequest looks like:
and on the RPC user update method I'm sending this UserUpdateRequest request.
I'm using com.smartgwt.client.widgets.form.fields.DateItem widget.
Code:
DateItem date = new DateItem("A date"); date.setWidth(320); date.setWrapTitle(false); date.setAttribute("useTextField", true); date.setAttribute("inputFormat", "yyyy/MM/dd"); date.setAttribute("displayFormat", "toJapanShortDate");
I'm adding this date on a DynamicForm:
Code:
DynamicForm form = new DynamicForm(); form.setFields(date);
Code:
VLayout editLayout = new VLayout(30); editLayout.addMember(form);
1. I'm selecting first the date from calendar - say I'm selecting 2011/02/11
2. I'm changing the day in 2011/02/12 manually - and I'm not changing the focus from this date field
3. I'm p the 'Save' button.
After these steps the date is 2011/02/11 and not 2011/02/12 how it should be.
In Internet Explorer browser did not happen - the date after the steps above is 2011/02/12!
I'm using smartgwt 2.4.
Thank you.
-----------------------------
Later edit:
I'm using a DataSource for updating the data.
I'm having a UserObject and in the userUpdate method I'm creating this user object first with values from fields (which are on the DynamicForm) - by calling the generateUserObjectFromForm() method
Code:
UserObject user = generateUserObjectFromForm();
I'm using an request object (UserUpdateRequest) for updating the user.
UserUpdateRequest looks like:
Code:
public class UserUpdateRequest implements IsSerializable { UserObject user = null; public UserUpdateRequest () { } public UserUpdateRequest (UserObject user) { this.user = user; } public UserObject getUser () { return user; } } final UserUpdateRequest request = new UserUpdateRequest(user);
Comment