Merge pull request #1093 from QingWei-Li/fix/datepicker-month

DatePicker: fix select year in month type, fixed #1070
pull/1099/head
SkyAo 2016-11-16 11:28:27 +08:00 committed by GitHub
commit d4e45e8d9b
2 changed files with 2 additions and 0 deletions

View File

@ -271,6 +271,7 @@
this.resetDate();
} else {
this.date.setMonth(month);
this.year && this.date.setFullYear(this.year);
this.resetDate();
const value = new Date(this.date.getFullYear(), month, 1);
this.$emit('pick', value);

View File

@ -4,6 +4,7 @@
@b year-table {
font-size: 12px;
margin: -1px;
border-collapse: collapse;
.el-icon {
color: var(--datepicker-icon-color);