Skip to content

Commit

Permalink
fix(module:datepicker): data binding not work when mode is month (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored and wilsoncook committed Oct 14, 2017
1 parent 03b87c1 commit dca0895
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/datepicker/nz-datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export class NzDatePickerComponent implements ControlValueAccessor, OnInit {
if (this.nzMode === 'month') {
this._closeCalendar();
this.nzValue = moment(this.nzValue).year(this._showYear).month(month.index).toDate();
this.onChange(this._value);
} else {
this._showMonth = month.index;
this._mode = 'year';
Expand Down

0 comments on commit dca0895

Please sign in to comment.