We can add tooltip and try for below code also to show error on dialog submit to have 7 days (function (document, $) {
$(document).on("click", ".cq-dialog-submit", function(e) {
let currentDate = new Date();
let selectedDate = new Date($("[name='./date']").val());...