Calendar.prototype.show = function()

in saga-web/src/main/resources/static/js/date.js [595:626]


Calendar.prototype.show = function (dateObj, popControl) {
  if (dateObj == null) {
    throw new Error("arguments[0] is necessary")
  }
  this.dateControl = dateObj;

  this.date = (dateObj.value.length > 0) ? new Date(dateObj.value
  .toDate(this.dateFormatStyle)) : new Date();// 若为空则显示当前月份
  this.year = this.date.getFullYear();
  this.month = this.date.getMonth();
  this.changeSelect();
  this.bindData();
  if (popControl == null) {
    popControl = dateObj;
  }
  var xy = this.getAbsPoint(popControl);
  this.panel.style.left = xy.x - 25 + "px";
  this.panel.style.top = (xy.y + dateObj.offsetHeight) + "px";

  this.panel.style.display = "";
  this.container.style.display = "";

  dateObj.onblur = function () {
    calendar.onblur();
  }
  this.container.onmouseover = function () {
    isFocus = true;
  }
  this.container.onmouseout = function () {
    isFocus = false;
  }
}