I fetch data to fill a value for a DateTimeItem that has a formatter. However, the value in the text part of the item is not formatted and appears as a Date.toString() string:
I know it's returning a Date object because when I check the dev console it has:
When I use the date picker to choose a date, the date appears as it should:
Here is my code:
Any ideas on how to make the fetched value display in the format I want?
Using SmartGWT 2.4 Power with IE7
Code:
Wed Sep 28 09:58:06 PDT 2011
Code:
time:new Date(1317229086303),
Code:
2011/09/28 00:00
Code:
DateTimeItem item = new DateTimeItem("time"); item.setDateFormatter(DateDisplayFormat.TOJAPANSHORTDATETIME); item.setValueFormatter(new DateTimeFormItemValueFormatter());
Using SmartGWT 2.4 Power with IE7
Comment