Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateItem display value problem

    Hi,

    I have a DateItem in my DynamicForm. When I call saveData method the form send to server a value like "08/11/2008" in xml date format "2008-08-11T00:00:00.000-03:00". It is exactly what I want.

    When I have something like code below the DateItem displays "2008-08-11T00:00:00.000-03:00" and not "08/11/2008". How can I show a formated date when I have a Json with a Xml Date format ?

    Code:
    JavaScriptObject myJsObject = // code that transform json like {"mydate":"2008-08-11T00:00:00.000-03:00"} in JavaScriptObject
    
    Record myRecord = new Record(myJsObject);
    
    DynamicForm myForm = new DynamicForm();
    DateItem myDate = new DateItem("mydate");
    
    myForm.setFields(myDate);
    
    form.editRecord(myRecord);

    #2
    Load the JSON via a DataSource where the field is type:"date". SmartGWT will parse that date format, including the timezone offset.

    Comment

    Working...
    X