Monday, November 13, 2017

Re: Datepicker don't closes after picking same date GWT

Any errors on the browser console?

private native void attachInternal() /*-{
  $wnd.jQuery("div.datePickerDay.datePickerDayIsValue").on( "Click", function() {
   
this.@com.xi.admin.client.common.ui.text.DateFormatter::uiDatePickerPopup.hide()();
    console.log("OK");
  });
}-*/
;

In your JSNI method "this" is probably not of type DateFormatter but the div element that has been clicked on. Try

private native void attachInternal() /*-{
  var that = this;
  $wnd.jQuery("div.datePickerDay.datePickerDayIsValue").on( "Click", function() {
    that.@com.xi.admin.client.common.ui.text.DateFormatter::uiDatePickerPopup.hide()();
    console.log("OK");
  });
}-*/
;


-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment