diff --git a/ui/datepicker.js b/ui/datepicker.js index 15e979c34..0f89e853b 100644 --- a/ui/datepicker.js +++ b/ui/datepicker.js @@ -184,8 +184,12 @@ widget = $.widget( "ui.datepicker", { }, _documentEvents: { - click: function( event ) { - if ( this.isOpen && !$( event.target ).closest( this.element.add( this.calendar ) ).length ) { + mousedown: function( event ) { + if ( !this.isOpen ) { + return; + } + + if ( !$( event.target ).closest( this.element.add( this.calendar ) ).length ) { this.close( event ); } }