pagelets/nodejitsu/creditcard/base.js
function date(event) {
    var result = this.lib.expiry(this.month.get('value'), this.year.get('value'))
      , className = result ? 'valid' : 'invalid';

    //
    // Update both select boxes.
    //
    this.month.removeClass('invalid').addClass(className);
    this.year.removeClass('invalid').addClass(className);
  }
function date(event) {
    var result = this.lib.expiry(this.month.get('value'), this.year.get('value'))
      , className = result ? 'valid' : 'invalid';

    //
    // Update both select boxes.
    //
    this.month.removeClass('invalid').addClass(className);
    this.year.removeClass('invalid').addClass(className);
  }
function date ( event ) { var result = this . lib . expiry ( this . month . get ( 'value' ) , this . year . get ( 'value' ) ) , className = result ? 'valid' : 'invalid' ; // // Update both select boxes. // this . month . removeClass ( 'invalid' ) . addClass ( className ) ; this . year . removeClass ( 'invalid' ) . addClass ( className ) ; }
On date changes, year or month, check expiration date.

@param {Event} event
@api private
On date changes year or month check expiration date .