Commit 226b084cd5545fc52eea3ab11e477722c455825f
1 parent
3aeb2bc6
Use first of month and not other panels date
since in cases where prev month date > next month date it will jump one more month ahead
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/date-picker/panel/Date/date-range.vue
... | ... | @@ -260,8 +260,8 @@ |
260 | 260 | }, |
261 | 261 | setPanelDates(leftPanelDate){ |
262 | 262 | this.leftPanelDate = leftPanelDate; |
263 | - const rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, leftPanelDate.getDate()); | |
264 | - this.rightPanelDate = this.splitPanels ? new Date(Math.max(this.dates[1], rightPanelDate)) : rightPanelDate; | |
263 | + const rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1); | |
264 | + this.rightPanelDate = this.splitPanels ? new Date(Math.max(this.dates[1].getTime(), rightPanelDate.getTime())) : rightPanelDate; | |
265 | 265 | }, |
266 | 266 | panelLabelConfig (direction) { |
267 | 267 | const locale = this.t('i.locale'); | ... | ... |