function Calendar()

in saga-web/src/main/resources/static/js/date.js [97:145]


function Calendar(beginYear, endYear, lang, dateFormatStyle) {
  this.beginYear = 1990;
  this.endYear = 2010;
  this.lang = 0; // 0(中文) | 1(英文)
  this.dateFormatStyle = "yyyy-MM-dd";

  if (beginYear != null && endYear != null) {
    this.beginYear = beginYear;
    this.endYear = endYear;
  }
  if (lang != null) {
    this.lang = lang
  }

  if (dateFormatStyle != null) {
    this.dateFormatStyle = dateFormatStyle
  }

  this.dateControl = null;
  this.panel = this.getElementById("calendarPanel");
  this.container = this.getElementById("ContainerPanel");
  this.form = null;

  this.date = new Date();
  this.year = this.date.getFullYear();
  this.month = this.date.getMonth();

  this.colors = {
    "cur_word": "#FFFFFF", // 当日日期文字颜色
    "cur_bg": "#83A6F4", // 当日日期单元格背影色
    "sel_bg": "#FFCCCC", // 已被选择的日期单元格背影色
    "sun_word": "#FF0000", // 星期天文字颜色
    "sat_word": "#0000FF", // 星期六文字颜色
    "td_word_light": "#333333", // 单元格文字颜色
    "td_word_dark": "#CCCCCC", // 单元格文字暗色
    "td_bg_out": "#EFEFEF", // 单元格背影色
    "td_bg_over": "#FFCC00", // 单元格背影色
    "tr_word": "#FFFFFF", // 日历头文字颜色
    "tr_bg": "#666666", // 日历头背影色
    "input_border": "#CCCCCC", // input控件的边框颜色
    "input_bg": "#EFEFEF" // input控件的背影色
  }

  this.draw();
  this.bindYear();
  this.bindMonth();
  this.changeSelect();
  this.bindData();
}