Fwiw, I updated my StackOverflow 
answer: https://stackoverflow.com/a/47236713/116472

On Monday, November 13, 2017 at 6:04:42 PM UTC+1, Ameen Malhans wrote:
>
>
>
> down votefavorite 
> <https://stackoverflow.com/questions/47230636/datepicker-dont-closes-after-picking-same-date-gwt/47236713#>
>
> 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() {
>        
> th...@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 google-web-toolkit+unsubscr...@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.

Reply via email to