Skip to content

Commit 5f079a1

Browse files
author
jikeytang
committed
update
1 parent 05c0f84 commit 5f079a1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

d/03/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
that.setDom();
127127
that.hideHandle();
128128
that.addNextMonth();
129+
that.addPrevMonth();
129130
}
130131
function createCalendar(){
131132
div.innerHTML = that.tpl[0];
@@ -251,6 +252,16 @@
251252
},
252253
removeNextMonth: function(){
253254
dog.off(this.next, 'click', this.nextMonthHandle.bind(this));
255+
},
256+
addPrevMonth : function(){
257+
dog.on(this.prev, 'click', this.prevMonthHandle.bind(this));
258+
},
259+
prevMonthHandle : function(e){
260+
var date = this.time.date
261+
262+
date.setMonth(--this.month)
263+
this.fill(this.getFullTime(date))
264+
this.fillYear()
254265
}
255266
}
256267
var defaults = {

0 commit comments

Comments
 (0)