SOURCE

console 命令行工具 X clear

                    
>
console
cola(function(model) {
  model.action({
    refreshCellDom: function(self, arg) {
      var date = new XDate(arg.date).toString("yyyy-MM-dd");
      var currentDate = new Date();

      function toStr(d, p) {
        var step = 86400000;
        var rd = new Date(d.getTime() + (p ? 1 : -1) * step);
        return new XDate(rd).toString("yyyy-MM-dd");
      }

      if (toStr(currentDate) == date) {
        $(arg.cell).append('<label>昨天</label>');
        return;
      }
      if (toStr(currentDate, true) == date) {
        $(arg.cell).append('<label>今天</label>');
        return;
      }
    }
  });
});
<c-panel caption="个人日程" width="400px">
  <c-calendar refreshCellDom="refreshCellDom" class="material">
  </c-calendar>
</c-panel>
c-panel.ui.panel{
  background-color:#fff;
}
.calendar .date-table-wrapper .date-table td {
  position: relative;
}

.calendar .date-table-wrapper .date-table td label {
  position: absolute;
  bottom: 0;
  height: 100%;
  display: table-cell;
  vertical-align: middle;
  width: 100%;
  background-color: #1C90F3;
  color: #fff;
  left: 0;
}

本项目引用的自定义外部资源