cus.js 1.0 KB

1234567891011121314151617181920212223242526
  1. // 渲染侧边栏&全年月份
  2. function renderFullMonth() {
  3. var sidebar_day = simpleMonth_area.find('.day')
  4. var fullYear_month = fullMonth_area.find('.month')
  5. var fullMonth_hmtl = ``
  6. var monthArr = ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'Octorber', 'November', 'December']
  7. for (var i = 0; i < 12; i ++) {
  8. fullMonth_hmtl += `<li class="item">
  9. <div class="title">${monthArr[i]}</div>
  10. <ul class="week">
  11. <li>日</li>
  12. <li>一</li>
  13. <li>二</li>
  14. <li>三</li>
  15. <li>四</li>
  16. <li>五</li>
  17. <li>六</li>
  18. </ul>
  19. <ul class="day">${tools.renderDay(this.year, i)}</ul>
  20. </li>`
  21. }
  22. fullYear_month.html(fullMonth_hmtl)
  23. sidebar_day.html(tools.renderDay(this.year, this.month))
  24. }