This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
score-tracker/public/scripts/manage/season.js

15 lines
442 B
JavaScript
Raw Normal View History

const seasonTextbox = document.getElementById('season-textbox');
const submitButton = document.getElementById('submit-button');
async function checkDataValidity() {
let dataIsValid = true;
if(seasonTextbox.value == "") dataIsValid = false;
submitButton.disabled = !dataIsValid;
}
checkDataValidity();
seasonTextbox.addEventListener('keyup', checkDataValidity);
seasonTextbox.addEventListener('change', checkDataValidity);