How to convert gwt Date to javascript Date?
How to convert gwt Date to javascript Date ?
public native String converToJSDate(Date date)/*-{
alert(date instanceof Date开发者_StackOverflow); // i get "false"
}-*/;
The easiest is to create an equivalent JS date:
JsDate.create((double) date.getTime())
public native final JsDate convertToJsDate(Date val) /*-{
return new $wnd.Date(val.@java.util.Date::getTime()());
...
精彩评论