Commit d4e45e8d authored by SkyAo's avatar SkyAo Committed by GitHub

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

DatePicker: fix select year in month type, fixed #1070
parents 238f8625 478549bd
...@@ -271,6 +271,7 @@ ...@@ -271,6 +271,7 @@
this.resetDate(); this.resetDate();
} else { } else {
this.date.setMonth(month); this.date.setMonth(month);
this.year && this.date.setFullYear(this.year);
this.resetDate(); this.resetDate();
const value = new Date(this.date.getFullYear(), month, 1); const value = new Date(this.date.getFullYear(), month, 1);
this.$emit('pick', value); this.$emit('pick', value);
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
@b year-table { @b year-table {
font-size: 12px; font-size: 12px;
margin: -1px; margin: -1px;
border-collapse: collapse;
.el-icon { .el-icon {
color: var(--datepicker-icon-color); color: var(--datepicker-icon-color);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment