开发者

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()());
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜