Skip to content

Commit

Permalink
fix(module: date-picker): fix caculate time error. (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guoyuanqiang authored and fisherspy committed May 24, 2019
1 parent cabfeda commit 413178d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions components/date-picker/date-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,14 @@ export class DatePickerComponent implements OnInit, OnDestroy, AfterViewInit {
this.selectedTarget[checkIdx].currentY = -arr.indexOf(this.resultArr[checkIdx]);
}
if (this.data[checkIdx].toString() !== arr.toString()) {
this.current_time[realIdx] = -targetLong / this.lineHeight + 1;
this.resultArr[checkIdx] = -targetLong / this.lineHeight + 1;
if (checkIdx >= 3) {
this.current_time[realIdx] = -targetLong / this.lineHeight;
this.resultArr[checkIdx] = -targetLong / this.lineHeight;
}else {
this.current_time[realIdx] = -targetLong / this.lineHeight + 1;
this.resultArr[checkIdx] = -targetLong / this.lineHeight + 1;
}

this.data[checkIdx] = arr;
this.dataWithStr[checkIdx] =
this.options.locale.locale === 'zh_CN'
Expand Down

0 comments on commit 413178d

Please sign in to comment.