You are viewing a single comment's thread. Return to all comments →
check the date if its valid
function check_date(value) { const date = value; setJoinDay(date); const today = new Date(); const selected = new Date(date);
today.setHours(0, 0, 0, 0); if (selected > today) { setErrorDay("Joining Date cannot be in the future"); } else { setErrorDay(""); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Employee Validation
You are viewing a single comment's thread. Return to all comments →
check the date if its valid
function check_date(value) { const date = value; setJoinDay(date); const today = new Date(); const selected = new Date(date);