Skip to content

Commit

Permalink
fix: 修复date-picker 12 月选不中的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhenfei committed Sep 30, 2020
1 parent fd7a8c2 commit afd5f17
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/pi-date-picker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,7 @@ export default {
pickerValue.push(this.years.findIndex(m => m === parseInt(this.date.year, 10)))
}
if (this.showMonth && this.date.month) {
let index = this.months.findIndex(m => m === parseInt(this.date.month, 10))
if (index > 0) index--
pickerValue.push(index)
pickerValue.push(this.months.findIndex(m => m === parseInt(this.date.month - 1, 10)))
}
if (this.showDay && this.date.date) {
pickerValue.push(this.days.findIndex(m => m === parseInt(this.date.date, 10)))
Expand Down

0 comments on commit afd5f17

Please sign in to comment.