Monday, November 13, 2017

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

Fwiw, I updated my StackOverflow answer:

On Monday, November 13, 2017 at 6:04:42 PM UTC+1, Ameen Malhans wrote:

I am calling java from java-script to close the date picker pop Up using following method.

     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");      });  }-*/;

this method is again called in the method attached.

The problem is that date picker doesn't closes after selecting same date which is already selected, but on value change it closes.I want to close it even after selecting same date as earlier. The attach method is following

     public void attach() {

    attachInternal();        datePickerValueChangeRegistration = uiDatePicker.addValueChangeHandler(new ValueChangeHandler<Date>() {          @Override          public void onValueChange(ValueChangeEvent<Date> event) {              uiDatePickerPopup.hide();              uiTextDate.setErrorVisible(false);              uiTextDate.setTextNoFormat(Moment.moment(event.getValue()).format("L"));          }      });        textDateClickRegistration = uiTextDate.addClickHandler(new ClickHandler() {          @Override          public void onClick(ClickEvent event) {              //if (uiTextDate.isReadOnly())              //  return;              if (!uiTextDate.isEnabled())                  return;              showPopup();            }      });        

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
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment