const left = document.querySelector("[data-duel-date='left']");
const right = document.querySelector("[data-duel-date='right']");

left.addEventListener("input", function () {
    if (this.value == "" || this.value == undefined || this.value == null) {
        right.removeAttribute('min');
        return;
    }
    right.setAttribute('min', this.value);
});
right.addEventListener("input", function () {
    if (this.value == "" || this.value == undefined || this.value == null) {
        left.removeAttribute('max');
        return;
    }
    left.setAttribute('max', this.value);
});