Correct year date navigation logic
This commit is contained in:
parent
8f6aeda4be
commit
77e43f2b87
2 changed files with 34 additions and 16 deletions
|
@ -145,7 +145,11 @@
|
|||
},
|
||||
methods: {
|
||||
changeYear(dir){
|
||||
this.panelDate = siblingMonth(this.panelDate, dir * 12);
|
||||
if (this.selectionMode === 'year'){
|
||||
this.panelDate = new Date(this.panelDate.getFullYear() + dir * 10, 0, 1);
|
||||
} else {
|
||||
this.panelDate = siblingMonth(this.panelDate, dir * 12);
|
||||
}
|
||||
},
|
||||
changeMonth(dir){
|
||||
this.panelDate = siblingMonth(this.panelDate, dir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue