diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js index bc356053b..b8ca084fa 100644 --- a/front/core/components/calendar/index.js +++ b/front/core/components/calendar/index.js @@ -225,6 +225,7 @@ export default class Calendar extends Component { */ moveNext(skip = 1) { let next = this.defaultDate.getMonth() + skip; + this.defaultDate.setDate(1); this.defaultDate.setMonth(next); this.repaint(); @@ -238,6 +239,7 @@ export default class Calendar extends Component { */ movePrevious(skip = 1) { let previous = this.defaultDate.getMonth() - skip; + this.defaultDate.setDate(1); this.defaultDate.setMonth(previous); this.repaint(); diff --git a/modules/worker/front/calendar/index.js b/modules/worker/front/calendar/index.js index bfb313630..06e2d0f33 100644 --- a/modules/worker/front/calendar/index.js +++ b/modules/worker/front/calendar/index.js @@ -98,8 +98,8 @@ class Controller { for (let i = 0; i < months.length; i++) { const now = new Date(); now.setHours(0, 0, 0, 0); - now.setMonth(i); now.setDate(1); + now.setMonth(i); months[i] = now; }