code: function(date) {
          var idx = -1;
          if (date) {
              var m = date.getMonth(),
                  y = date.getFullYear(),
                  d = date.getDate(),
                  dates = this.cellDates;
  
              for (var i = 0; i < dates.length; ++i) {
                  var cellDate = dates[i];
                  if (cellDate[0] === y && cellDate[1] === m+1 && cellDate[2] === d) {
                      idx = i;
                      break;
                  }
              }
          }
          return idx;
      }
docs: Find the Calendar's cell index for a given date.
  If the date is not found, the method returns -1.
  <p>
  The returned index can be used to lookup the cell HTMLElement
  using the Calendar's cells array or passed to selectCell to select
  cells by index.
  </p>
  
  See <a href="#cells">cells</a>, <a href="#selectCell">selectCell</a>.
  
  @method getCellIndex
  @param {Date} date JavaScript Date object, for which to find a cell index.
  @return {Number} The index of the date in Calendars cellDates/cells arrays, or -1 if the date
  is not on the curently rendered Calendar page.