code: function(event) {
  			if (!plugin.curInst) {
  				return;
  			}
  			var elem = $(event.target);
  			if (elem.closest('.' + plugin._popupClass + ',.' + plugin._triggerClass).length === 0 &&
  					!elem.hasClass(plugin._getMarker())) {
  				plugin.hide(plugin.curInst);
  			}
  		}
docs: Close date picker if clicked elsewhere.
  @memberof CalendarsPicker
  @private
  @param event {MouseEvent} The mouse click to check.