packages/ag-grid-docs/src/dist/aui/js/aui-datepicker.js
/*
   * Bind hover events for datepicker elements.
   * Done via delegate so the binding only occurs once in the lifetime of the parent div.
   * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
   */
Bind hover events for datepicker elements.
Done via delegate so the binding only occurs once in the lifetime of the parent div.
Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
Bind hover events for datepicker elements . Done via delegate so the binding only occurs once in the lifetime of the parent div . Global instActive set by _updateDatepicker allows the handlers to find their way back to the active picker .
function bindHover(dpDiv) {
  	var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
  	return dpDiv.bind('mouseout', function(event) {
  			var elem = $( event.target ).closest( selector );
  			if ( !elem.length ) {
  				return;
  			}
  			elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" );
  		})
  		.bind('mouseover', function(event) {
  			var elem = $( event.target ).closest( selector );
  			if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||
  					!elem.length ) {
  				return;
  			}
  			elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
  			elem.addClass('ui-state-hover');
  			if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover');
  			if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover');
  		});
  }
function bindHover ( dpDiv ) { var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a' ; return dpDiv . bind ( 'mouseout' , function ( event ) { var elem = $ ( event . target ) . closest ( selector ) ; if ( ! elem . length ) { return ; } elem . removeClass ( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" ) ; } ) . bind ( 'mouseover' , function ( event ) { var elem = $ ( event . target ) . closest ( selector ) ; if ( $ . datepicker . _isDisabledDatepicker ( instActive . inline ? dpDiv . parent ( ) [ 0 ] : instActive . input [ 0 ] ) || ! elem . length ) { return ; } elem . parents ( '.ui-datepicker-calendar' ) . find ( 'a' ) . removeClass ( 'ui-state-hover' ) ; elem . addClass ( 'ui-state-hover' ) ; if ( elem . hasClass ( 'ui-datepicker-prev' ) ) elem . addClass ( 'ui-datepicker-prev-hover' ) ; if ( elem . hasClass ( 'ui-datepicker-next' ) ) elem . addClass ( 'ui-datepicker-next-hover' ) ; } ) ; }
Bind hover events for datepicker elements.
Bind hover events for datepicker elements .