Skip to content

Commit

Permalink
DateTimePicker: fix invalid month value bug for Firefox 37 (ElemeFE#9501
Browse files Browse the repository at this point in the history
)

* DateTimePicker: fix invalid month value for Firefox 37

* Update date-range.vue
  • Loading branch information
c0hb1rd authored and Leopoldthecoder committed Jan 28, 2018
1 parent 86f8ff1 commit 3d7d498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/date-picker/src/panel/date-range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
enableMonthArrow() {
const nextMonth = (this.leftMonth + 1) % 12;
const yearOffset = this.leftMonth + 1 >= 12 ? 1 : 0;
return this.unlinkPanels && new Date(`${this.leftYear + yearOffset}-${nextMonth + 1}`) < new Date(`${this.rightYear}-${this.rightMonth + 1}`);
return this.unlinkPanels && new Date(this.leftYear + yearOffset, nextMonth) < new Date(this.rightYear, this.rightMonth);
},
enableYearArrow() {
Expand Down

0 comments on commit 3d7d498

Please sign in to comment.