diff --git a/static/src/js/canvas.js b/static/src/js/canvas.js index 8fb92d78aca69399d8e83a0763fab339a6f01df0..7d23f3b2dac98a9f8d64bd85f60169de054e5deb 100644 --- a/static/src/js/canvas.js +++ b/static/src/js/canvas.js @@ -669,12 +669,12 @@ odoo.define("oacc_portal_overview_cdc.canvas", function (require) { } // Disable buttons if first or last date - if (this.last_day == this.maxDate) { + if (this.last_day >= this.maxDate) { $('button[id="next-period"]').prop("disabled", true); } else { $('button[id="next-period"]').prop("disabled", false); } - if (this.first_day == this.minDate) { + if (this.first_day <= this.minDate) { $('button[id="previous-period"]').prop("disabled", true); } else { $('button[id="previous-period"]').prop("disabled", false);